How to catch QSystemTrayIcon quit event
I have QSystemTrayIcon subclass , inside i have
@quitAction = new QAction(tr("&Quit;"), m_parent);
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); @
CloseEvent doesn't work here .. how can i catch this quit event ?
i want to save data befor closing .
You either can connect to QApplication::destroyed() or connect your quitAction to your slot which will save data and call qApp->quit().
what about aboutToQuit()?
yep, should also help you