⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

QSystemTrayIcon activated signal only sends on double click (Ubuntu/Gnome)

  • I am using Ubuntu 18.04 with Gnome desktop and seeing the the activated signal only emits when double-clicking on the icon. I need to have emit on single click:

    connect(m_pTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
            this,        SLOT(onActivated(QSystemTrayIcon::ActivationReason)));
    // Slot to handle tray icon activated signal
    void MyClass::onActivated(QSystemTrayIcon::ActivationReason r)
        if (r == QSystemTrayIcon::Trigger)
            if (!this->isVisible())

    I want to be able to either:

    • emit activated signal on single mouse click

    • detect a single mouse click event on the system tray icon

  • Lifetime Qt Champion

    @anshah I don't use Gnome, but is it possible that this is default behaviour?

  • @jsulm It seems like this is default behavior for Gnome. However, on Unity desktop it only needs a single click.

Log in to reply