Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QKeySequence (modifier+key) only works after pressing the key first without the modifier
WoGi last edited by
Hi, I have a simple QWidget. I want to run one of its methods when I press Alt+`.
This shortcut works fine, but only when I've pressed ` first at least once (so without the Alt key). If I do this once, the hotkey will continue to work as expected for the rest of the session.
Ratzz last edited by
I have tried to reproduce it , but could not .
I tried this and works for me.
QShortcut *shortcut = new QShortcut(QKeySequence("Alt+`"), this); QObject::connect(shortcut, SIGNAL(activated()), this, SLOT(yourSolt()));