title: c++ qt tray icon menu action
body: <p>I got this code in qt creator;</p>
  
  <pre><code>int main( int argc, char* argv[] )
  {
    QApplication oApp( argc, argv );
  
    QAction *action1;
    QMenu menu;
  
    QSystemTrayIcon TrayIcon( QIcon("favicon.ico") );
  
    TrayIcon.show();
  
    action1= new QAction("action1", NULL);
  
    action1-&gt;setStatusTip("Create a new file");
  
  
    menu.addAction(action1);
    TrayIcon.setContextMenu(&amp;menu);
    return oApp.exec();
  }
  </code></pre>
  
  <p>but how can i make that when i open the menu and press on action1 that it execute a function?</p>
  
  <p>thnx very much!</p>