[Solved] QSystemTrayIcon close without exit.
-
Dear all,
I made a QSystemTrayIcon application like that.
@MyApp::MyApp(QWidget *parent) : QMainWindow(parent)
{
this->setVisible(false);QSystemTrayIcon *trayIcon = new QSystemTrayIcon(this); trayIcon->setVisible(true); QMenu *trayMenu = QMenu(this); trayMenu->addAction(about); trayIcon->setContextMenu(trayMenu); connect(about,SIGNAL(triggered()),qApp,SLOT(aboutQt()));
}@
The problem is that when I close the about Qt dialog, it also exit the application.
How can I solve that?Thanks
-
Look at "quitOnLastWindowClosed property":http://doc.qt.nokia.com/latest/qapplication.html#quitOnLastWindowClosed-prop