I want my users to assign their own shortcuts to various operations. For this purpose, Qt offers a standard widget QKeySequenceEdit. Unfortunately, this widget does not check its input for duplicates and gladly accepts even standard combinations, such as Ctrl+Cetc. I would like to:
- Ideally, get a list of all the shortcuts active in my application, as well as their translation tips. I do not think that's possible.
- Less ideal, connect to
QKeySequenceEdit::editingFinished(), create a shortcut and call it somehow to see the signal QShortcut::activatedAmbiguously(). However, there seems to be no way to run software programming.
You can, of course, resort to submitting the key sequence to the OS and reproduce it in order to check the ambiguous activation, but it looks rather far-fetched. Any better ideas?
sigil source
share