title: In Qt, how to show keyboard shortcuts in menu but disable them?
body: <p>I'm adding a bunch of <code>QAction</code>s to my main window's menus. These actions can also be triggered by the keyboard, and I want the shortcut to be visible in the menu, as usual, e.g. </p>
  
  <pre><code>-----------------
  |Copy     Ctrl+C|
  -----------------
  </code></pre>
  
  <p>I can do this using <code>QAction.setShortcut()</code>. However, I <strong>don't</strong> want these <code>QAction</code>s to be triggered by the shortcuts; I'm handling all keyboard input separately elsewhere. </p>
  
  <p>Is this possible? Can I disable the shortcut in the QAction but still have the shortcut text (in this example <kbd>Ctrl</kbd> + <kbd>C</kbd>) in my menus?</p>
  
  <p><strong>EDIT</strong>: The way I ended up doing it is connecting to the menu's <code>aboutToShow()</code> and <code>aboutToHide()</code> events, and enabling/disabling the shortcuts so they are only active when the menu is shown. But I'd appreciate a cleaner solution...</p>