<?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[files are automatically imported as objects?]]></title><description><![CDATA[<p dir="auto">I'm very new to QML and QtQuick, so I apologize if the following is a bad question.  If the answers could be easily found in some documentation, please point me in that direction, thanks.</p>
<p dir="auto">I am trying to change SDDM login on my Lubuntu OS.   The appearance is managed by a file called "Main.qml", which imports QtQuick 2.0 and SddmComponents2.0.   The code in this file references an object called "PictureBox", which doesn't seem to exist in QtQuick.  I assume PictureBox object is created by "PictureBox.qml", part of SDDM components:<br />
<a href="https://github.com/jhonwoo/sddm/tree/master/components/2.0" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/jhonwoo/sddm/tree/master/components/2.0</a></p>
<p dir="auto">PictureBox.qml only imports QtQuick2.0, but it uses another object I can't find in QtQuick called PasswordBox.  So, can I assume that QML files located in the same directory can automatically import each other without explicit import statements?</p>
<p dir="auto">Also, if I want to modify PictureBox object in any way, can I do this from Main.qml, or do I have to modify the PictureBox.qml file?</p>
<p dir="auto">Thanks.</p>
]]></description><link>https://forum.qt.io/topic/114400/files-are-automatically-imported-as-objects</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 10:46:43 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/114400.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 May 2020 02:29:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to files are automatically imported as objects? on Tue, 05 May 2020 02:06:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sierdzio">@<bdi>sierdzio</bdi></a> Thank you!</p>
]]></description><link>https://forum.qt.io/post/592595</link><guid isPermaLink="true">https://forum.qt.io/post/592595</guid><dc:creator><![CDATA[anotherChris]]></dc:creator><pubDate>Tue, 05 May 2020 02:06:42 GMT</pubDate></item><item><title><![CDATA[Reply to files are automatically imported as objects? on Mon, 04 May 2020 05:02:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anotherchris">@<bdi>anotherChris</bdi></a> said in <a href="/post/592372">files are automatically imported as objects?</a>:</p>
<blockquote>
<p dir="auto">So, can I assume that QML files located in the same directory can automatically import each other without explicit import statements?</p>
</blockquote>
<p dir="auto">Yes.</p>
<blockquote>
<p dir="auto">Also, if I want to modify PictureBox object in any way, can I do this from Main.qml, or do I have to modify the PictureBox.qml file?</p>
</blockquote>
<p dir="auto">You can modify properties of objects where you use them. So for example:</p>
<pre><code>Item {
 x: 5
 y: 20
}
</code></pre>
<p dir="auto"><code>x</code> and <code>y</code> are properties defined in Item.qml, but you can manipulate them in your file. If you want to add a property, you can do it, too:</p>
<pre><code>Item {
 property int coord: 20
 x: coord + 8
 y: coord
}
</code></pre>
<p dir="auto">But if you want to do deeper modifications of item (like - remove a property), you need to do it in the source file.</p>
]]></description><link>https://forum.qt.io/post/592377</link><guid isPermaLink="true">https://forum.qt.io/post/592377</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Mon, 04 May 2020 05:02:26 GMT</pubDate></item></channel></rss>