<?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[Connecting QML signals with Qt slots.]]></title><description><![CDATA[<p dir="auto">Hi! I have such code:</p>
<p dir="auto">@Item {<br />
signal itemClicked()</p>
<p dir="auto">MouseArea {<br />
anchor.fill: parent<br />
onClicked: itemClicked()<br />
}<br />
}@</p>
<p dir="auto">Can I connect itemClicked() to slot in cpp application?</p>
<p dir="auto">@QDeclarativeEngine *engine = new QDeclarativeEngine;<br />
QDeclarativeComponent component(engine, QUrl::fromLocalFile("qml/TestQML/TestQML.qml"));<br />
QObject *myObject = component.create();<br />
QDeclarativeItem <em>item = qobject_cast&lt;QDeclarativeItem</em>&gt;(myObject);<br />
qDebug()&lt;&lt;QObject::connect(item, SIGNAL(titleBarClicked()), &amp;viewer, SLOT(showMaximized()));@</p>
<p dir="auto">connect() retuns true, but it doesn't work.</p>
]]></description><link>https://forum.qt.io/topic/1702/connecting-qml-signals-with-qt-slots</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 01:42:50 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/1702.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Nov 2010 22:03:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Connecting QML signals with Qt slots. on Mon, 15 Nov 2010 14:50:00 GMT]]></title><description><![CDATA[<p dir="auto">I've tried this feature in a simple project and it works. So the mistake somewhere in the my test app.</p>
<p dir="auto">P.S. You can see this "code example":<a href="http://www.fileconvoy.com/filelist.php?id=gfd6e298a19c42fa5359453643e0534cdae6ef" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.fileconvoy.com/filelist.php?id=gfd6e298a19c42fa5359453643e0534cdae6ef</a>.</p>
<p dir="auto">Maybe you are know what's wrong :)</p>
]]></description><link>https://forum.qt.io/post/60011</link><guid isPermaLink="true">https://forum.qt.io/post/60011</guid><dc:creator><![CDATA[kibsoft]]></dc:creator><pubDate>Mon, 15 Nov 2010 14:50:00 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting QML signals with Qt slots. on Sun, 14 Nov 2010 23:56:51 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Could you add a bug report on "<a href="http://bugreports.qt.nokia.com" target="_blank" rel="noopener noreferrer nofollow ugc">http://bugreports.qt.nokia.com</a>":bugreports.qt.nokia.com with a small example to reproduce the problem?</p>
<p dir="auto">Thanks,<br />
Michael</p>
]]></description><link>https://forum.qt.io/post/59960</link><guid isPermaLink="true">https://forum.qt.io/post/59960</guid><dc:creator><![CDATA[mbrasser]]></dc:creator><pubDate>Sun, 14 Nov 2010 23:56:51 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting QML signals with Qt slots. on Fri, 12 Nov 2010 08:32:04 GMT]]></title><description><![CDATA[<p dir="auto">bq. In the example the connect has titleBarClicked and the QML has itemClicked, is that just a typo?</p>
<p dir="auto">Yes, it's a typo. But it doesn't work :(</p>
<p dir="auto">bq. see if this helps</p>
<p dir="auto">I need reverse connection..</p>
]]></description><link>https://forum.qt.io/post/59862</link><guid isPermaLink="true">https://forum.qt.io/post/59862</guid><dc:creator><![CDATA[kibsoft]]></dc:creator><pubDate>Fri, 12 Nov 2010 08:32:04 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting QML signals with Qt slots. on Fri, 12 Nov 2010 01:47:47 GMT]]></title><description><![CDATA[<p dir="auto">In the example the connect has titleBarClicked and the QML has itemClicked, is that just a typo? (if so, I don't see obviously wrong -- it looks like it should be working)</p>
]]></description><link>https://forum.qt.io/post/59846</link><guid isPermaLink="true">https://forum.qt.io/post/59846</guid><dc:creator><![CDATA[mbrasser]]></dc:creator><pubDate>Fri, 12 Nov 2010 01:47:47 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting QML signals with Qt slots. on Thu, 11 Nov 2010 22:41:32 GMT]]></title><description><![CDATA[<p dir="auto">see if "this":<a href="http://wiki.forum.nokia.com/index.php/CS001625_-_Connecting_Qt_signal_to_QML_function" target="_blank" rel="noopener noreferrer nofollow ugc">http://wiki.forum.nokia.com/index.php/CS001625_-_Connecting_Qt_signal_to_QML_function</a> helps</p>
]]></description><link>https://forum.qt.io/post/59834</link><guid isPermaLink="true">https://forum.qt.io/post/59834</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 11 Nov 2010 22:41:32 GMT</pubDate></item></channel></rss>