[Interest] Application wide shortcuts in QML?

Mark markg85 at gmail.com
Tue Nov 27 22:08:51 CET 2012


Hi,

In Qt you have QShortcut to make application wide shortcuts. However,
QShortcut required a QWidget to work. That kinda prevents me to map
QShortcut to a QML element because i don't have a QWidget in there.

Does anyone know how i can get application wide shortcuts in QML?

What i can do (as a workaround) is registering the shortcuts in C++
and then just sending a signal to QML when one of the requested
shortcuts has been pressed. That will likely work, but i rather
prevent such hacks if possible :)

Kind regards,
Mark



More information about the Interest mailing list