I created tray icon with context menu and attached its activated signal to slot in my dialog:
trayIconMenu = new QMenu(this);
trayIconMenu->addAction(showAction);
trayIconMenu->addAction(quitAction);
trayIcon = new QSystemTrayIcon(this);
trayIcon->setContextMenu(trayIconMenu);
trayIcon->setIcon(QIcon(":/images/gear.png"));
trayIcon->show();
trayIcon->showMessage(tr("SSTRNL-B"),tr("Message from tray icon!"));
QObject::connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(trayactivated(QSystemTrayIcon::ActivationReason)));
My slot is called when I click on tray icon. So everything is going right except I can not see context menu attached to QSystemTrayIcon.
In desktop systems we can use right-click on tray icon to see its context menu. But what am I supposed to do in Windows mobile/CE to see context menu?