I currently have a menu that looks something like this:
What I would like to do, is make the part that displays the keyboard shortcut a button that can be clicked. When the user clicks this button, they will be taken to the shortcut editor, with the relevant shortcut highlighted, where they can then customise it.
However, right now, all I can find on modifying a QMenu
is to use a QActionWidget
, but this replaces the QMenu with a custom widget, which does not look and behave like a standard menu item any more.
So my questions are thus:
- Is it possible to modify a QMenu without using a QActionWidget? (Either through inheritance or some other method). I was thinking maybe it's possible to simply highlight the keyboard shortcut when the mouse hovers over it by overriding the paint function?
- Is there an open source library somewhere that recreates the look and feel of a QMenu using a QActionWidget, that allows for easy modification?
Thank you :)