<?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[Is QML Guaranteed to be Processed serially?]]></title><description><![CDATA[<p dir="auto">I have this script:<br />
@<br />
import QtQuick 1.0<br />
import FileIO 1.0<br />
import RectData 1.0</p>
<p dir="auto">Rectangle {<br />
id: main<br />
width: 360<br />
height: 360</p>
<pre><code>MouseArea {
    anchors.fill: parent
    onClicked: {
        Qt.quit();
    }
}

FileIO {
    id: reader
    source: "./rectangles.txt"
    onError: console.log(msg)
}

RectData {
    id: rectangles
}

 Text {
      id: mytxt
        text:"starting.."
        Component.onCompleted: {
            mytxt.text = reader.read()
            console.log (rectangles.populate(mytxt.text, width, height))
            mygrid.focus = true;
        }
 }

GridView {
    id: mygrid
    x:0
    y:0
    width: 100
    height: 100
    model: rectangles
    delegate: RectDelegate

}
</code></pre>
<p dir="auto">}<br />
@<br />
In this QML, I want to read a txt file(C++ function rectangles.populate()) and process it before the Grid shows it. IS sequential parsing and processing guaranteed in QML? Am I implementing it correct?</p>
]]></description><link>https://forum.qt.io/topic/35159/is-qml-guaranteed-to-be-processed-serially</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 19:23:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/35159.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 06 Dec 2013 09:05:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is QML Guaranteed to be Processed serially? on Fri, 06 Dec 2013 12:26:30 GMT]]></title><description><![CDATA[<p dir="auto">QML is read first, then it's being processed in an event loop. You can't depend on that being sequential.</p>
<p dir="auto">But if your model is done properly, the engine will detect that "rectangles" has hanged and will be updated once the changes are done.</p>
]]></description><link>https://forum.qt.io/post/206556</link><guid isPermaLink="true">https://forum.qt.io/post/206556</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Fri, 06 Dec 2013 12:26:30 GMT</pubDate></item></channel></rss>