Sorry, misunderstood your problem, QShortCut won't install system-wide hotkeys
But you could always try to implement your own messageFilter.
I have a simple program with a widget. At startup the widget is not shown.
I want to assign a hotkey ( for instance "ctrl + space" ). So when the user pressses "ctrl + space" the widget is shown.
I know i can register the hotkey with
RegisterHotKey(winId(), 100, MOD_CONTROL, VK_SPACE);
But how do i get and react on the messages windows sends when the user presses "ctrl + space" and should RegisterHotKey(); be place anywhere specific in the code?
Sorry, misunderstood your problem, QShortCut won't install system-wide hotkeys
But you could always try to implement your own messageFilter.
"If you lie to the compiler, it will get its revenge." - Henry Spencer
Thank you for your answers. I got it to work with QWidget::winEvent().
Bookmarks