title: Unable to link QAction to a function when triggered (Qt 5)
body: <p>I am trying to add a context menu to the system tray (activatable by clicking the system tray icon) I have successfully added the menu and an action with text "Exit", however I don't know how to link the actions "triggered" function to another function / change the triggered function or whatever else would work. I simply want to activate some particular behaviour when I click the action. This action button doesn't do anything when I click it. I tried linking it to a member function with this constructor: <code>QAction *QMenu::addAction(const QIcon &amp;icon, const QString &amp;text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &amp;shortcut = ...)</code>
  Here is the most important segment of my code:</p>
  
  <pre><code>     MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
      {
          ui-&gt;setupUi(this);
          mSystemTrayIcon = new QSystemTrayIcon(this);
          mSystemTrayIcon-&gt;setIcon(QIcon(":/iris_logo.png"));
          mSystemTrayIcon-&gt;setVisible(true);
  
          systemTrayMenu = new QMenu("Context menu");
          systemTrayMenu-&gt;setToolTipsVisible(true);
   // I get the error: no matching member function for call to 'addAction'
          systemTrayMenu-&gt;addAction("Open", this, on_actionQuit_triggered())); 
  
  // I dont get an error, however this only creates a menu button, not its corresponding function that must be called.
          systemTrayMenu-&gt;addAction("Exit"); 
          mSystemTrayIcon-&gt;setContextMenu(systemTrayMenu);
      }
  </code></pre>