In software like qtcreator you can see things like this:

Basically some box which when clicked ask you to press some keyboard combination in order to record a shortcut.
How can I create something like that in Qt? I was able so far to implement this only using a regular text box in which user had to type the combination themselves and if it wasn't correct message box appeared, but it would be much more simple if users didn't have to type things like "ctrl + f2" but instead click these keys.
Is there any Qt widget for this?
Use QKeySequenceEdit, available since Qt 5.2. It allows you to record shortcut key like in Qt Designer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With