<?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[how to have double click on a image on single click]]></title><description><![CDATA[<p dir="auto">I display a QPixMap in QTreevIew . When the user double clicks on the image I should bring QColorDialog</p>
<p dir="auto">I tried following code but I can get the behavior on single click but I want the behavior only on double click</p>
<p dir="auto">MyInstView::myInstView(QWidget* dparent)<br />
: QTreeView(dparent),<br />
{<br />
connect(this, SIGNAL(clicked(const QModelIndex&amp;)),<br />
this, SLOT(clickInstance(const QModelIndex&amp;)));<br />
}</p>
]]></description><link>https://forum.qt.io/topic/69612/how-to-have-double-click-on-a-image-on-single-click</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 06:49:39 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/69612.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Jul 2016 21:28:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to how to have double click on a image on single click on Tue, 26 Jul 2016 21:49:33 GMT]]></title><description><![CDATA[<p dir="auto">Yes <a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> is correct and sorry, it was my bad speeling :-)</p>
]]></description><link>https://forum.qt.io/post/339428</link><guid isPermaLink="true">https://forum.qt.io/post/339428</guid><dc:creator><![CDATA[hskoglund]]></dc:creator><pubDate>Tue, 26 Jul 2016 21:49:33 GMT</pubDate></item><item><title><![CDATA[Reply to how to have double click on a image on single click on Tue, 26 Jul 2016 21:47:07 GMT]]></title><description><![CDATA[<p dir="auto">Because it's <code>doubleClicked</code>. Casing is important.</p>
<p dir="auto">If you are using Qt 5, then you should go for the new syntax. That would have already failed at compile time.</p>
]]></description><link>https://forum.qt.io/post/339427</link><guid isPermaLink="true">https://forum.qt.io/post/339427</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 26 Jul 2016 21:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to how to have double click on a image on single click on Tue, 26 Jul 2016 21:41:50 GMT]]></title><description><![CDATA[<p dir="auto">I am getting following message when I start my GUI</p>
<p dir="auto">Object::connect: No such signal GQInstView::doubleclicked(QModelIndex)</p>
<p dir="auto">the code is as follows -----<br />
GQInstView::GQInstView(QWidget* dparent)<br />
: QTreeView(dparent), model(0),<br />
{<br />
QObject::connect(this, SIGNAL(doubleclicked(const QModelIndex&amp;)),  this, SLOT(clickInstance(const QModelIndex&amp;)));<br />
}</p>
<p dir="auto">Is there anything I am missing</p>
]]></description><link>https://forum.qt.io/post/339424</link><guid isPermaLink="true">https://forum.qt.io/post/339424</guid><dc:creator><![CDATA[Qt Enthusiast]]></dc:creator><pubDate>Tue, 26 Jul 2016 21:41:50 GMT</pubDate></item><item><title><![CDATA[Reply to how to have double click on a image on single click on Mon, 25 Jul 2016 21:35:59 GMT]]></title><description><![CDATA[<p dir="auto">Hi, try <code>connect(this,SIGNAL(doubleclicked(const QModelIndex&amp;)),</code></p>
]]></description><link>https://forum.qt.io/post/339261</link><guid isPermaLink="true">https://forum.qt.io/post/339261</guid><dc:creator><![CDATA[hskoglund]]></dc:creator><pubDate>Mon, 25 Jul 2016 21:35:59 GMT</pubDate></item><item><title><![CDATA[Reply to how to have double click on a image on single click on Mon, 25 Jul 2016 21:35:19 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Why not use the <a href="http://doc.qt.io/qt-5/qabstractitemview.html#doubleClicked" target="_blank" rel="noopener noreferrer nofollow ugc">doubleClicked</a> signal ?</p>
]]></description><link>https://forum.qt.io/post/339260</link><guid isPermaLink="true">https://forum.qt.io/post/339260</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 25 Jul 2016 21:35:19 GMT</pubDate></item></channel></rss>