How would I detect the pressing of one of the arrow keys in qt? Also, would the application still detect them if it is minimized?
+2
A:
How would I detect the pressing of one of the arrow keys in qt?
By handling the key press event in the top most widget in the hierarchy. See the list of key codes, the Qt::Left - Qt::Down range is what you're interested in.
Also, would the application still detect them if it is minimized?
No. It would detect them only if it had the keyboard's focus, which is not the case when minimized. You can't set up global hotkeys in a cross-platform fashion in Qt.
Jakub Wieczorek
2010-10-30 19:20:01
What exactly would I use to detect the input while minimized?
a sandwhich
2010-10-31 00:40:48
Either the platform-specific native interfaces or some other cross-platform solution, such as Qxt: http://doc.libqxt.org/0.6.0/qxtglobalshortcut.html.
Jakub Wieczorek
2010-10-31 14:42:16