<div dir="ltr"><div>Hello,</div><div>I'm using QML for some years now but recently I have found a behaviour which may be a bug or at least makes list property initialisation inconsistent with the way other types are handled.</div><div>The behaviour can be traced back to (at least) Qt 5.2 and is still present in Qt 5.13.</div><div>If I create a class with a QQmlListProperty and then initialise it with an array in some QML file, then subclass the QML type in a second QML file and try to override the array there, when creating an instance of the child class, the list contains the arrays concatenated instead of the overriding array.</div><div>In the following example, I would expect the list to contain 2 elements instead of 5. What are your thoughts? Should I fill a bug report and try to provide a fix?</div><div><br></div><div>Best regards,</div><div><br></div><div>Unai Irigoyen</div><div><br></div><div>Example:</div><div>// containedtype.h //</div><div>

<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">ifndef</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,106,173)">CONTAINEDTYPE_H</span></pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">define</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,106,173)">CONTAINEDTYPE_H</span></pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">include</span><span style="color:rgb(190,192,194)"> </span><<span style="color:rgb(214,149,69)">QObject</span>></pre>

<pre style="margin:0px;text-indent:0px"><span style="font-style:italic;color:rgb(69,198,214)">class</span><span style="color:rgb(190,192,194)"> </span><span style="font-weight:600;color:rgb(255,128,128)">ContainedType</span><span style="color:rgb(190,192,194)"> </span>:<span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(69,198,214)">public</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,128,128)">QObject</span></pre>
<pre style="margin:0px;text-indent:0px">{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,106,173)">Q_OBJECT</span></pre>

<pre style="margin:0px;text-indent:0px">};</pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">endif</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(168,171,176)">//</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(168,171,176)">CONTAINEDTYPE_H<br>
</span></pre><div>// mytype.h //

<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">ifndef</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,106,173)">MYTYPE_H</span></pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">define</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,106,173)">MYTYPE_H</span></pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">include</span><span style="color:rgb(190,192,194)"> </span><<span style="color:rgb(214,149,69)">QObject</span>></pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">include</span><span style="color:rgb(190,192,194)"> </span><<span style="color:rgb(214,149,69)">QQmlListProperty</span>></pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">include</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,149,69)">"containedtype.h"</span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-style:italic;color:rgb(69,198,214)">class</span><span style="color:rgb(190,192,194)"> </span><span style="font-weight:600;color:rgb(255,128,128)">MyType</span><span style="color:rgb(190,192,194)"> </span>:<span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(69,198,214)">public</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,128,128)">QObject</span></pre>
<pre style="margin:0px;text-indent:0px">{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,106,173)">Q_OBJECT</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,106,173)">Q_PROPERTY</span>(<span style="color:rgb(255,128,128)">QQmlListProperty</span><<span style="color:rgb(255,128,128)">ContainedType</span>><span style="color:rgb(190,192,194)"> </span>myList<span style="color:rgb(190,192,194)"> </span>READ<span style="color:rgb(190,192,194)"> </span>myList)</pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,128,128)">QQmlListProperty</span><<span style="color:rgb(255,128,128)">ContainedType</span>><span style="color:rgb(190,192,194)"> </span><span style="font-weight:600">myList</span>(){</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="font-style:italic;color:rgb(69,198,214)">return</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,128,128)">QQmlListProperty</span><<span style="color:rgb(255,128,128)">ContainedType</span>>(<span style="font-style:italic;color:rgb(69,198,214)">this</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(138,96,44)">0</span>,</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">                                   </span><span style="color:rgb(214,187,154)">&</span>my_list_append,</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">                                   </span><span style="color:rgb(214,187,154)">&</span>my_list_count,</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">                                   </span><span style="color:rgb(214,187,154)">&</span>my_list_at,</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">                                   </span><span style="color:rgb(214,187,154)">&</span>my_list_clear);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>}</pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="font-style:italic;color:rgb(69,198,214)">private</span>:</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,128,128)">QList</span><<span style="color:rgb(255,128,128)">ContainedType</span>*><span style="color:rgb(190,192,194)"> </span>m_myList;</pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="font-style:italic;color:rgb(69,198,214)">static</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(69,198,214)">inline</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,154,167)">void</span><span style="color:rgb(190,192,194)"> </span><span style="font-weight:600">my_list_append</span>(<span style="color:rgb(255,128,128)">QQmlListProperty</span><<span style="color:rgb(255,128,128)">ContainedType</span>><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">property</span>,<span style="color:rgb(255,128,128)">ContainedType</span><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">value</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="color:rgb(255,128,128)">MyType</span><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">instance</span><span style="color:rgb(190,192,194)"> </span>=<span style="color:rgb(190,192,194)"> </span>qobject_cast<<span style="color:rgb(255,128,128)">MyType</span>*>(<span style="color:rgb(214,187,154)">property</span>->object);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="font-style:italic;color:rgb(69,198,214)">if</span>(<span style="color:rgb(214,187,154)">instance</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">         </span><span style="color:rgb(214,187,154)">instance</span>->m_myList.append(<span style="color:rgb(214,187,154)">value</span>);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>}</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>}</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="font-style:italic;color:rgb(69,198,214)">static</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(69,198,214)">inline</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,154,167)">int</span><span style="color:rgb(190,192,194)"> </span><span style="font-weight:600">my_list_count</span>(<span style="color:rgb(255,128,128)">QQmlListProperty</span><<span style="color:rgb(255,128,128)">ContainedType</span>><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">property</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="color:rgb(255,128,128)">MyType</span><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">instance</span><span style="color:rgb(190,192,194)"> </span>=<span style="color:rgb(190,192,194)"> </span>qobject_cast<<span style="color:rgb(255,128,128)">MyType</span>*>(<span style="color:rgb(214,187,154)">property</span>->object);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="font-style:italic;color:rgb(69,198,214)">if</span>(<span style="color:rgb(214,187,154)">instance</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">         </span><span style="font-style:italic;color:rgb(69,198,214)">return</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">instance</span>->m_myList.count();</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>}</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="font-style:italic;color:rgb(69,198,214)">else</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">         </span><span style="font-style:italic;color:rgb(69,198,214)">return</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(138,96,44)">0</span>;</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>}</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>}</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="font-style:italic;color:rgb(69,198,214)">static</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(69,198,214)">inline</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,128,128)">ContainedType</span><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="font-weight:600">my_list_at</span>(<span style="color:rgb(255,128,128)">QQmlListProperty</span><<span style="color:rgb(255,128,128)">ContainedType</span>><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">property</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,154,167)">int</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">index</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="color:rgb(255,128,128)">MyType</span><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">instance</span><span style="color:rgb(190,192,194)"> </span>=<span style="color:rgb(190,192,194)"> </span>qobject_cast<<span style="color:rgb(255,128,128)">MyType</span>*>(<span style="color:rgb(214,187,154)">property</span>->object);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="font-style:italic;color:rgb(69,198,214)">if</span>(<span style="color:rgb(214,187,154)">instance</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">         </span><span style="font-style:italic;color:rgb(69,198,214)">return</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">instance</span>->m_myList.at(<span style="color:rgb(214,187,154)">index</span>);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>}</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="font-style:italic;color:rgb(69,198,214)">else</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">         </span><span style="font-style:italic;color:rgb(69,198,214)">return</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(69,198,214)">nullptr</span>;</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>}</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>}</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="font-style:italic;color:rgb(69,198,214)">static</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(69,198,214)">inline</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,154,167)">void</span><span style="color:rgb(190,192,194)"> </span><span style="font-weight:600">my_list_clear</span>(<span style="color:rgb(255,128,128)">QQmlListProperty</span><<span style="color:rgb(255,128,128)">ContainedType</span>><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">property</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="color:rgb(255,128,128)">MyType</span><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">instance</span><span style="color:rgb(190,192,194)"> </span>=<span style="color:rgb(190,192,194)"> </span>qobject_cast<<span style="color:rgb(255,128,128)">MyType</span>*>(<span style="color:rgb(214,187,154)">property</span>->object);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span><span style="font-style:italic;color:rgb(69,198,214)">if</span>(<span style="color:rgb(214,187,154)">instance</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">         </span><span style="color:rgb(214,187,154)">instance</span>->m_myList.clear();</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">      </span>}</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>}</pre>
<pre style="margin:0px;text-indent:0px">};</pre>

<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">endif</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(168,171,176)">//</span><span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(168,171,176)">MYTYPE_H</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-style:italic;color:rgb(168,171,176)">
</span></pre><div>// main.cpp //

<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">include</span><span style="color:rgb(190,192,194)"> </span><<span style="color:rgb(214,149,69)">QGuiApplication</span>></pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">include</span><span style="color:rgb(190,192,194)"> </span><<span style="color:rgb(214,149,69)">QQmlApplicationEngine</span>></pre>
<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(255,106,173)">include</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,149,69)">"mytype.h"</span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(214,154,167)">int</span><span style="color:rgb(190,192,194)"> </span><span style="font-weight:600">main</span>(<span style="color:rgb(214,154,167)">int</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">argc</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,154,167)">char</span><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(214,187,154)">argv</span>[])</pre>
<pre style="margin:0px;text-indent:0px">{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,128,128)">QCoreApplication</span>::setAttribute(<span style="color:rgb(255,128,128)">Qt</span>::<span style="font-style:italic;color:rgb(102,163,52)">AA_EnableHighDpiScaling</span>);</pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,128,128)">QGuiApplication</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">app</span>(<span style="font-style:italic;color:rgb(214,187,154)">argc</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">argv</span>);</pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>qmlRegisterType<<span style="color:rgb(255,128,128)">ContainedType</span>>(<span style="color:rgb(214,149,69)">"array.override.test"</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(138,96,44)">1</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(138,96,44)">0</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,149,69)">"ContainedType"</span>);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span>qmlRegisterType<<span style="color:rgb(255,128,128)">MyType</span>>(<span style="color:rgb(214,149,69)">"array.override.test"</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(138,96,44)">1</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(138,96,44)">0</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,149,69)">"MyType"</span>);</pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,128,128)">QQmlApplicationEngine</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">engine</span>;</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="font-style:italic;color:rgb(69,198,214)">const</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,128,128)">QUrl</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">url</span>(<span style="color:rgb(255,106,173)">QStringLiteral</span><span style="color:rgb(214,187,154)">(</span><span style="color:rgb(214,149,69)">"qrc:/main.qml"</span><span style="color:rgb(214,187,154)">)</span>);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(255,128,128)">QObject</span>::connect(<span style="color:rgb(214,187,154)">&</span><span style="color:rgb(214,187,154)">engine</span>,<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">&</span><span style="color:rgb(255,128,128)">QQmlApplicationEngine</span>::objectCreated,</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">                    </span><span style="color:rgb(214,187,154)">&</span><span style="color:rgb(214,187,154)">app</span>,<span style="color:rgb(190,192,194)"> </span>[<span style="color:rgb(214,187,154)">url</span>](<span style="color:rgb(255,128,128)">QObject</span><span style="color:rgb(190,192,194)"> </span>*<span style="color:rgb(214,187,154)">obj</span>,<span style="color:rgb(190,192,194)"> </span><span style="font-style:italic;color:rgb(69,198,214)">const</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,128,128)">QUrl</span><span style="color:rgb(190,192,194)"> </span>&<span style="color:rgb(214,187,154)">objUrl</span>)<span style="color:rgb(190,192,194)"> </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">                       </span><span style="font-style:italic;color:rgb(69,198,214)">if</span><span style="color:rgb(190,192,194)"> </span>(<span style="color:rgb(214,187,154)">!</span><span style="color:rgb(214,187,154)">obj</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">&&</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">url</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">==</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">objUrl</span>)</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">                          </span><span style="color:rgb(255,128,128)">QCoreApplication</span>::exit(<span style="color:rgb(214,187,154)">-</span><span style="color:rgb(138,96,44)">1</span>);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">                    </span>},<span style="color:rgb(190,192,194)"> </span><span style="color:rgb(255,128,128)">Qt</span>::<span style="font-style:italic;color:rgb(102,163,52)">QueuedConnection</span>);</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="color:rgb(214,187,154)">engine</span>.load(<span style="color:rgb(214,187,154)">url</span>);</pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">   </span><span style="font-style:italic;color:rgb(69,198,214)">return</span><span style="color:rgb(190,192,194)"> </span><span style="color:rgb(214,187,154)">app</span>.exec();</pre>
<pre style="margin:0px;text-indent:0px">}<br> </pre>



<span style="font-style:italic;color:rgb(168,171,176)">
</span><div>// BaseType.qml //</div><div>

<pre style="margin:0px;text-indent:0px"><span style="font-style:italic;color:rgb(69,198,214)">import</span><span style="color:rgb(190,192,194)"> </span>array.override.test<span style="color:rgb(190,192,194)"> </span>1.0</pre><pre style="margin:0px;text-indent:0px"><span style="color:rgb(102,163,52)">MyType</span><span style="color:rgb(190,192,194)"> </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">    </span><span style="color:rgb(255,106,173)">myList</span>:<span style="color:rgb(190,192,194)"> </span>[</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">        </span><span style="color:rgb(102,163,52)">ContainedType</span>{},</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">        </span><span style="color:rgb(102,163,52)">ContainedType</span>{},</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">        </span><span style="color:rgb(102,163,52)">ContainedType</span>{}</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">    </span>]</pre>
<pre style="margin:0px;text-indent:0px">}</pre></div><div><br></div>



<span style="font-style:italic;color:rgb(168,171,176)">
</span><div>// OverridenType.qml //

<pre style="margin:0px;text-indent:0px"><span style="font-style:italic;color:rgb(69,198,214)">import</span><span style="color:rgb(190,192,194)"> </span>array.override.test<span style="color:rgb(190,192,194)"> </span>1.0</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(102,163,52)">BaseType</span><span style="color:rgb(190,192,194)"> </span>{</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">    </span><span style="color:rgb(255,106,173)">myList</span>:<span style="color:rgb(190,192,194)"> </span>[</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">        </span><span style="color:rgb(102,163,52)">ContainedType</span>{},</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">        </span><span style="color:rgb(102,163,52)">ContainedType</span>{}</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(190,192,194)">    </span>]</pre>
<pre style="margin:0px;text-indent:0px">}</pre></div>



<pre style="margin:0px;text-indent:0px"><span style="font-style:italic;color:rgb(168,171,176)">
</span></pre><div>// main.qml //</div><div>

<pre style="margin:0px;text-indent:0px"><span style="font-style:italic;color:rgb(69,198,214)">import</span><span style="color:rgb(190,192,194)"> </span>array.override.test<span style="color:rgb(190,192,194)"> </span>1.0</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(102,163,52)">OverridenType</span><span style="color:rgb(190,192,194)"> </span>{</pre>
<pre style="margin:0px;text-indent:0px">}</pre></div></div>

</div>

</div></div>