keyboard shortcuts - Respond to application-wide "hotkey" in Qt -


i've got simple qt app, , want respond f12 key, regardless of widget has focus.

is there easy signal or can hook in to?

i want use f12 key toggle main window fullscreen on/off.

i haven't tried, here :

create qshortcut , make sure context (with setcontext()) qt::applicationshortcut.

shortcut = new qshortcut(qkeysequence(qt::key_f12), parent); shortcut->setcontext(qt::applicationshortcut); 

then need connect slot qshortcut::activated() signal.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -