<?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[Controlling a main.qml&#x27;s Loader from a &#x27;children&#x27; qml files]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I am very new to Qt and QML. I have a main.qml file which has two views (kind of a splitview but manually made).</p>
<p dir="auto">In the first view, I load a qml filewhich contains a TabView . The contents of each tab would be loaded from other qml files. In each of these files I would like to have a button which would load the second view in the main.qml file.</p>
<p dir="auto">Is this approach possible? My main problem is how to make the qml files which are being viewed in the tabs to control the Loader in the main.qml.</p>
<p dir="auto">Thanks a lot!!!</p>
]]></description><link>https://forum.qt.io/topic/127302/controlling-a-main-qml-s-loader-from-a-children-qml-files</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 14:09:11 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/127302.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Jun 2021 13:16:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Controlling a main.qml&#x27;s Loader from a &#x27;children&#x27; qml files on Wed, 09 Jun 2021 06:37:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sierdzio">@<bdi>sierdzio</bdi></a> Thank you for your reply - I really appreciate it. It will take some time to digest your instructions as I am very new to qt and qml - I have to read about signals and how they work. However, just yesterday I got it working by creating a property of Loader in the main qml file which refers to the view I want to load other views and then I am calling that property in the qml file that is loaded from the tabs qml file.</p>
]]></description><link>https://forum.qt.io/post/664103</link><guid isPermaLink="true">https://forum.qt.io/post/664103</guid><dc:creator><![CDATA[nazlab]]></dc:creator><pubDate>Wed, 09 Jun 2021 06:37:01 GMT</pubDate></item><item><title><![CDATA[Reply to Controlling a main.qml&#x27;s Loader from a &#x27;children&#x27; qml files on Fri, 04 Jun 2021 19:07:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nazlab">@<bdi>nazlab</bdi></a> said in <a href="/post/663484">Controlling a main.qml's Loader from a 'children' qml files</a>:</p>
<blockquote>
<p dir="auto">Is this approach possible?</p>
</blockquote>
<p dir="auto">Definitely!</p>
<blockquote>
<p dir="auto">My main problem is how to make the qml files which are being viewed in the tabs to control the Loader in the main.qml.</p>
</blockquote>
<p dir="auto">There are many ways to do it:</p>
<ul>
<li>from your tabs, send a <code>signal</code>, which you can pick up in your <code>main.qml</code> and react by loading correct screen in your other view</li>
<li>define a Singleton, or a custom QObject added to root context property, which will contain certain signals - your tabs will fire those, and <code>main.qml</code> can react through a <code>Connections {}</code> component</li>
</ul>
<p dir="auto">Hope it helps :-) I can get into more detail here, feel free to ask more detailed questions.</p>
]]></description><link>https://forum.qt.io/post/663548</link><guid isPermaLink="true">https://forum.qt.io/post/663548</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Fri, 04 Jun 2021 19:07:48 GMT</pubDate></item></channel></rss>