Trouble with QxtGlobalShortcut [solved]
- by Ockonal
Hello, i'm trying to set global shortcut for my applcation using QxtGlobalShortcut.
Here is my code:
QxtGlobalShortcut m_hotkeyHandle;
m_hotkeyHandle.setShortcut( QKeySequence("Ctrl+Shift+X") );
m_hotkeyHandle.setEnabled(true);
connect( &m_hotkeyHandle, SIGNAL(activated()),
this, SLOT(hotkeyPressed()) );
void MainWindow::hotkeyPressed()
{
QMessageBox::information(this, "Good", "Hot key triggered", "yes", "no");
}
But after applcation started i got:
QxtGlobalShortcut failed to register:
"Ctrl+Shift+X"
And my programm doesn't activate after hot key pressing. What should i do?
EDIT:
There was a bug in Qxt-lib 0.5 with shortcut. I spoke with developer and knew that i just need to update library from dev-branch (0.5.1 is worked).