Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Show all registered shortcuts within an application
cristeab last edited by
I have a mixed QML and C++ application and my action linked with "Esc" key generates the warning: "ambiguous shortcut". Is there a way to display a list with all available shortcuts within an application ? It is possible to handle "Esc" from within the application ?
texpert last edited by
Regarding the handling of Esc key - http://qt-project.org/doc/qt-5/qwidget.html#keyPressEvent - "The default implementation closes popup widgets if the user presses Esc." So you could override the default event handler with your own or better use another key or key sequence.
AFAIK there is no list of all shortcuts. I think you could query one by one the list of standard key sequences http://qt-project.org/doc/qt-5/qkeysequence.html#StandardKey-enum with QKeySequence::keyBindings - http://qt-project.org/doc/qt-5/qkeysequence.html#keyBindings