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
Post a Comment