<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QSystemTrayIcon activated signal only sends on double click (Ubuntu&#x2F;Gnome)]]></title><description><![CDATA[<p dir="auto">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:</p>
<pre><code>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-&gt;isVisible())
        {
            this-&gt;show();
        }
        else
        {
            this-&gt;hide();
        }
    }
}
</code></pre>
<p dir="auto">I want to be able to either:</p>
<ul>
<li>
<p dir="auto">emit activated signal on single mouse click</p>
</li>
<li>
<p dir="auto">detect a single mouse click event on the system tray icon</p>
</li>
</ul>
]]></description><link>https://forum.qt.io/topic/107210/qsystemtrayicon-activated-signal-only-sends-on-double-click-ubuntu-gnome</link><generator>RSS for Node</generator><lastBuildDate>Mon, 28 Sep 2026 09:44:07 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/107210.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Sep 2019 00:25:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QSystemTrayIcon activated signal only sends on double click (Ubuntu&#x2F;Gnome) on Tue, 29 Oct 2019 18:51:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> It seems like this is default behavior for Gnome. However, on Unity desktop it only needs a single click.</p>
]]></description><link>https://forum.qt.io/post/558835</link><guid isPermaLink="true">https://forum.qt.io/post/558835</guid><dc:creator><![CDATA[anshah]]></dc:creator><pubDate>Tue, 29 Oct 2019 18:51:29 GMT</pubDate></item><item><title><![CDATA[Reply to QSystemTrayIcon activated signal only sends on double click (Ubuntu&#x2F;Gnome) on Thu, 26 Sep 2019 04:21:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anshah">@<bdi>anshah</bdi></a> I don't use Gnome, but is it possible that this is default behaviour?</p>
]]></description><link>https://forum.qt.io/post/552905</link><guid isPermaLink="true">https://forum.qt.io/post/552905</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Thu, 26 Sep 2019 04:21:13 GMT</pubDate></item></channel></rss>