title: How to add a button to a QMenu, or reproduce a QMenu in a custom QWidgetAction
body: <p>I currently have a menu that looks something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/isbBt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/isbBt.png" alt="The &quot;File&quot; menu, with two options, &quot;Save&quot; and &quot;Reload&quot;. Each has a keyboard shortcut visible as well."></a></p>
  
  <p>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.</p>
  
  <p>However, right now, all I can find on modifying a <code>QMenu</code> is to use a <code>QActionWidget</code>, but this replaces the QMenu with a custom widget, which does not look and behave like a standard menu item any more.</p>
  
  <p>So my questions are thus:</p>
  
  <ol>
  <li>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?</li>
  <li>Is there an open source library somewhere that recreates the look and feel of a QMenu using a QActionWidget, that allows for easy modification?</li>
  </ol>
  
  <p>Thank you :)</p>