t</span>
         <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
         <span class="name">objectName</span>: <span class="string">&quot;myRect&quot;</span>
     }
 }
</pre>
<pre class="cpp" translate="no">
 <span class="comment">// main.cpp</span>

 <span class="type">QQuickView</span> view;
 view<span class="operator">.</span>setSource(<span class="type">QUrl</span><span class="operator">::</span>fromLocalFile(<span class="string">&quot;MyRect.qml&quot;</span>));
 view<span