1 2 3 4 5 6 7 8 9 10 11 12 13
| trayIcon = new QSystemTrayIcon(this); trayMenu = new QMenu(this); trayMenu->addAction(Action1);
......
trayMenu->addAction(quitAction10);
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(show())); trayIcon->setIcon(QIcon(":/icons/trayIcon.png")); trayIcon->setContextMenu(trayMenu);
|