<?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[Send Signals between different Qml Objects]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I have some items define in different QML files  and i load them dynamically base on user option  in my main qml. I want when  one of these  items is clicked to load a specific item in my main QML file.<br />
As i  was searching for a solution for this i tried Signals but i can only make it work if items are defined in main QML. I think the problem lies in the way i initialize my QML items(i dont know if there is otherway around)</p>
<p dir="auto">The code below is how i choose which Grid to load (the items are initialized there) base on user option</p>
<pre><code> function getModelFile()
    {
        if (choice === "1") return "Fourby4Mesh4VCs.qml";
        else if (choice === "2") return "Threeby3Mesh4Vcs.qml";


    }
Loader{
                width:rowLayout.width*0.55
                height: rowLayout.width*0.55
                anchors.left: topologyLayout.left
                anchors.top: topologyLayout.top
                sourceComponent: none.none
                id:loadTopology
                source:getModelFile()

            }
</code></pre>
]]></description><link>https://forum.qt.io/topic/76005/send-signals-between-different-qml-objects</link><generator>RSS for Node</generator><lastBuildDate>Fri, 23 Oct 2026 08:55:38 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/76005.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Feb 2017 09:02:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Send Signals between different Qml Objects on Thu, 09 Feb 2017 12:15:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dheerendra">@<bdi>dheerendra</bdi></a> Your post helped me alot and thank you  for the explanation.!</p>
]]></description><link>https://forum.qt.io/post/374668</link><guid isPermaLink="true">https://forum.qt.io/post/374668</guid><dc:creator><![CDATA[nnicou]]></dc:creator><pubDate>Thu, 09 Feb 2017 12:15:35 GMT</pubDate></item><item><title><![CDATA[Reply to Send Signals between different Qml Objects on Thu, 09 Feb 2017 12:00:27 GMT]]></title><description><![CDATA[<p dir="auto">Sorry i have a edited my post but i am not sure if have explained correct what i am trying to do</p>
<p dir="auto">I will add a photo that it may explained better what i ma trying to do<br />
<a href="https://drive.google.com/open?id=0B1zHpsqEO9qBekZUYmZEUndDaWM" target="_blank" rel="noopener noreferrer nofollow ugc">https://drive.google.com/open?id=0B1zHpsqEO9qBekZUYmZEUndDaWM</a></p>
]]></description><link>https://forum.qt.io/post/374664</link><guid isPermaLink="true">https://forum.qt.io/post/374664</guid><dc:creator><![CDATA[nnicou]]></dc:creator><pubDate>Thu, 09 Feb 2017 12:00:27 GMT</pubDate></item><item><title><![CDATA[Reply to Send Signals between different Qml Objects on Thu, 09 Feb 2017 11:48:32 GMT]]></title><description><![CDATA[<p dir="auto">It is about signals between different objects. You  are loading QML file through  loader. This creates new object that representing that qml file.  You can access the object creation loader through id:loadTopology.item.</p>
<p dir="auto">You can define connections like this for the signals which are emitted from the qml files which are loaded through loader.</p>
<p dir="auto">Connections {<br />
target : loadTopology.item<br />
on&lt;Signal&gt;:{</p>
<p dir="auto">}<br />
}</p>
<p dir="auto">Please note it is not about signals between qml files. QML files are components. You are creating the objects from these components. Signals/slots communication need to happened between objects.</p>
]]></description><link>https://forum.qt.io/post/374655</link><guid isPermaLink="true">https://forum.qt.io/post/374655</guid><dc:creator><![CDATA[dheerendra]]></dc:creator><pubDate>Thu, 09 Feb 2017 11:48:32 GMT</pubDate></item><item><title><![CDATA[Reply to Send Signals between different Qml Objects on Thu, 09 Feb 2017 10:25:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nnicou">@<bdi>nnicou</bdi></a> Your code tells nothing, I can't even see how it's related to your question. If you use Loader, did you follow "Receiving signals from loaded objects" in Loader doc?</p>
]]></description><link>https://forum.qt.io/post/374628</link><guid isPermaLink="true">https://forum.qt.io/post/374628</guid><dc:creator><![CDATA[Eeli K]]></dc:creator><pubDate>Thu, 09 Feb 2017 10:25:59 GMT</pubDate></item></channel></rss>