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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With