<?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[Single QML page where children are unable to access other siblings]]></title><description><![CDATA[<p dir="auto">Hi there,</p>
<p dir="auto">I have a Simple Page with nested children and one of the child get data from C++ and want to set current Index of a Combobox, but i get undefidend error.</p>
<p dir="auto">I tried creating a alias property but failed miserably.</p>
<pre><code>Page{


SomeOther{


onC++Event{


imnotaccessible.currentIndex = 0;
undefied error

}


}

ListView{

header: Toolbar{

     ComboBox{
        
            id: imnotaccessible

     }

}

}

}
</code></pre>
<p dir="auto">Please advise<br />
Thanks</p>
]]></description><link>https://forum.qt.io/topic/87430/single-qml-page-where-children-are-unable-to-access-other-siblings</link><generator>RSS for Node</generator><lastBuildDate>Sat, 08 Aug 2026 12:18:41 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/87430.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 03 Feb 2018 08:20:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Single QML page where children are unable to access other siblings on Mon, 05 Feb 2018 09:40:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scotryder">@<bdi>scotryder</bdi></a> please don't forget to mark your post as solved, thank you</p>
]]></description><link>https://forum.qt.io/post/440368</link><guid isPermaLink="true">https://forum.qt.io/post/440368</guid><dc:creator><![CDATA[Pablo J. Rogina]]></dc:creator><pubDate>Mon, 05 Feb 2018 09:40:19 GMT</pubDate></item><item><title><![CDATA[Reply to Single QML page where children are unable to access other siblings on Sat, 03 Feb 2018 14:23:41 GMT]]></title><description><![CDATA[<p dir="auto">Cant thank you enough, it was a pain in the neck and you just solved in an instant.<br />
Thanks again :)</p>
]]></description><link>https://forum.qt.io/post/440170</link><guid isPermaLink="true">https://forum.qt.io/post/440170</guid><dc:creator><![CDATA[scotryder]]></dc:creator><pubDate>Sat, 03 Feb 2018 14:23:41 GMT</pubDate></item><item><title><![CDATA[Reply to Single QML page where children are unable to access other siblings on Sat, 03 Feb 2018 08:43:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scotryder">@<bdi>scotryder</bdi></a> said in <a href="/post/440134">Single QML page where children are unable to access other siblings</a>:</p>
<p dir="auto">A simple solution to the problem of access is to set an accessible property from your hierarchy with the id of the inaccessible item when you do have access to it.</p>
<pre><code>import QtQuick 2.9
import QtQuick.Window 2.0
import QtQuick.Controls 2.2

Window
{
    visible: true
    width: 200
    height: 200
    id:root
    property var anAccessibleItem
    Item
    {
        Rectangle
        {
            width: 100
            height: 100
            color: "red"
            MouseArea
            {
                anchors.fill: parent
                onClicked: console.info(anAccessibleItem.anInt++)
            }
        }
    }
    ListView
    {
        header: Item
        {
            Item
            {
                id: imnotaccessible
                property int anInt: 3
                Component.onCompleted: root.anAccessibleItem = imnotaccessible
            }
        }

    }
}
</code></pre>
]]></description><link>https://forum.qt.io/post/440136</link><guid isPermaLink="true">https://forum.qt.io/post/440136</guid><dc:creator><![CDATA[SR__]]></dc:creator><pubDate>Sat, 03 Feb 2018 08:43:37 GMT</pubDate></item></channel></rss>