views:

69

answers:

1

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.

+1  A: 

Solved.

Explorer.exe has system tray balloon tips disabled through system registry (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\EnableBalloonTips was set to 0).

Hernán