Cannot get QSystemTrayIcon to work correctly with activation reason
问题 I am using Ubuntu 12.04 and, while I can create a tray icon with a usable menu, I cannot control its actions: trayIcon = new QSystemTrayIcon(this); trayIcon->setIcon(QIcon(":/icons/Pictures/icon.png")); trayIcon->setToolTip(QString("Hello there...")); connect(trayIcon,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this,SLOT(clickSysTrayIcon(QSystemTrayIcon::ActivationReason))); connect(this,SIGNAL(minimized()),this,SLOT(hide()),Qt::QueuedConnection); QMenu *changer_menu = new QMenu;