<?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[[SOLVED] Reference error: id is not defined]]></title><description><![CDATA[<p dir="auto">After clicking row in table view I get this error:<br />
"ReferenceError: customID is not defined", despite of fact that I have element with this ID. What's wrong?</p>
<p dir="auto">Here is code (only that, what in my opinion is important in this case)</p>
<p dir="auto">@<br />
import QtQuick.Layouts 1.0<br />
import QtQuick 2.4<br />
import QtQuick.Controls 1.3<br />
import QtQuick.Window 2.2<br />
import QtQuick.Dialogs 1.2</p>
<p dir="auto">Rectangle<br />
{<br />
ListModel<br />
{<br />
id: usersModel<br />
}</p>
<pre><code>TabView 
{
    Tab 
    {
        title: "1"
        RowLayout
        {
            ColumnLayout
            {
                TableView
                {
                    onClicked: customID.color = "#FFFFFF"
                    TableViewColumn
                    {
                    }
                }
            }
            Rectangle 
            {
                TabView
                {
                    Tab
                    {
                        title: "A"
                        Rectangle
                        {
                            id: customID
                            color: "#00000000"
                        }
                    }
                }
            }
        }
    }
}
</code></pre>
<p dir="auto">}<br />
@</p>
]]></description><link>https://forum.qt.io/topic/49767/solved-reference-error-id-is-not-defined</link><generator>RSS for Node</generator><lastBuildDate>Sat, 17 Oct 2026 05:42:26 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/49767.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Jan 2015 18:49:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] Reference error: id is not defined on Sat, 03 Jan 2015 13:21:01 GMT]]></title><description><![CDATA[<p dir="auto">Thank you very much! Now it works.</p>
]]></description><link>https://forum.qt.io/post/256088</link><guid isPermaLink="true">https://forum.qt.io/post/256088</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sat, 03 Jan 2015 13:21:01 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Reference error: id is not defined on Fri, 02 Jan 2015 21:20:49 GMT]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">customerId is within a Tab (which inherits from Loader), so it's not possible to use customerId to refere to the element from outside the Tab/Loader using customerId.</p>
<p dir="auto">You can look "here":<a href="http://doc.qt.io/qt-5/qml-qtquick-loader.html#receiving-signals-from-loaded-objects" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qml-qtquick-loader.html#receiving-signals-from-loaded-objects</a> for one way of accessing "customID".</p>
<p dir="auto">I would probably create a property in the top TabView to propagate the  information</p>
]]></description><link>https://forum.qt.io/post/256045</link><guid isPermaLink="true">https://forum.qt.io/post/256045</guid><dc:creator><![CDATA[David Stiel]]></dc:creator><pubDate>Fri, 02 Jan 2015 21:20:49 GMT</pubDate></item></channel></rss>