I'm trying to use QSystemTrayIcon to display a message after application initialization. My main loop immediately calls Init() function by using a single-shot timer with zero period:
int r;
QTimer::singleShot(0, &app, SLOT(Init()));
r = app.exec();
return r;
After some initialization steps, and the creation of trayIcon in MyApplication::SetupTrayIcon(), where the proper icon appears without problem, I call another function in the MyApplication class where I do.
QApplication::processEvents();
_pTrayIcon->showMessage("TITLE", "TRAY TEXT SAMPLE");
I tried making the QSystemTrayIcon instance a child of QApplication (MyApplication which is a subclass), a QWidget child, and nothing happens. Even without any parent, nothing happens.
System is Windows XP SP3, nothing out of this world.