title: qtcreator tray icon under window does not show up when deployed
body: <p>i'am trying to deploy a QT application made in QT Creator which goes back to system tray when closed.</p>
  
  <p>I have made a svg tray icon, when i run it from QT Creator, either in debug and in release mode under Window 7, the tray icon shows up, but when i copy everything to another directory to make a distributable archive from it, the tray icon does not show up anymore.</p>
  
  <p>Of course i search already for solutions, but everything i have found yet, i have made.</p>
  
  <p>So what i have:</p>
  
  <p>trayicon.svg file in project root</p>
  
  <ul>
  <li>qrc file created, adding trayicon.svg into the resource files root</li>
  <li>in project .pro file: RESOURCES += resources.qrc</li>
  <li>copied binary + necessary dll's to target directory</li>
  <li>copied QT plugins imageformats/* to target dir imageformats</li>
  <li>added QApplication a(argc, argv); a.addLibraryPath(a.applicationDirPath()); to main.cpp</li>
  </ul>
  
  <p>that is everything i found so far, but still the system tray icon is not showing up</p>
  
  <p>What am i missing?</p>
  
  <p>(current qt 4.8 + current qtcreator by the way)</p>
  
  <p>@netrom</p>
  
  <p>code in MainWindow : QMainWindow constructor:</p>
  
  <pre><code>trayIcon = new QSystemTrayIcon(this);
  showAction = new QAction(tr("&amp;Show"), this);
  connect(showAction, SIGNAL(triggered()), this, SLOT(show()));
  quitAction = new QAction(tr("&amp;Quit"), this);
  connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
  trayIconMenu = new QMenu(this);
  trayIconMenu-&gt;addAction(showAction);
  trayIconMenu-&gt;addSeparator();
  trayIconMenu-&gt;addAction(quitAction);
  trayIcon-&gt;setContextMenu(trayIconMenu);
  connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
  trayIcon-&gt;setIcon(QIcon(":trayicon.svg"));
  trayIcon-&gt;show();
  </code></pre>