title: Create QAction with shortcut, without inserting in menu
body: <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  #include &lt;QDebug&gt;
  #include &lt;cassert&gt;
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
  
      QAction* back = new QAction(this);
      back-&gt;setVisible(true);
      back-&gt;setShortcut(QKeySequence("Ctrl+M"));
      bool cres = connect(back, SIGNAL(triggered(bool)), this, SLOT(mySlot()));
      assert(cres);
  }
  </code></pre>
  
  <p>In this code I tried to catch <code>Ctrl+M</code> key event. I don't want to put the action in menu. <code>connect</code> returns true but <code>mySlot</code> is never called. When action is inserted in menu, shortcut works well. What I have done wrong?</p>