title: QML Cannot assign to non-existent property
body: <p>I'm trying to create a custom QML object. I started simple, by making a qml file called <strong>rect.qml</strong>:</p>
  
  <pre><code>import QtQuick 2.2
  Rectangle 
  { }
  </code></pre>
  
  <p><em>In the same directory</em>, I wanted to use my rect object in a seperate qml file, called <strong>window.qml</strong>:</p>
  
  <pre><code>import QtQuick 2.2
  Item {
    id: mainWindow
    rect
    { }
  }
  </code></pre>
  
  <p>Very high caliber stuff, I know. Anyway, when I try to run my application, I get the following error: </p>
  
  <p><strong>qrc:/qml/window.qml:3:13: Cannot assign to non-existent property "rect"</strong></p>
  
  <p>So I checked my QRC file, and it goes as such:</p>
  
  <pre><code>&lt;RCC&gt;
      &lt;qresource prefix="/qml"&gt;
          &lt;file&gt;window.qml&lt;/file&gt;
          &lt;file&gt;rect.qml&lt;/file&gt;
      &lt;/qresource&gt;
  &lt;/RCC&gt;
  </code></pre>
  
  <p>According to the documentation (<a href="http://doc.qt.io/qt-5/qtqml-documents-definetypes.html" rel="nofollow noreferrer">http://doc.qt.io/qt-5/qtqml-documents-definetypes.html</a>) this application isn't very useful as it's so bare bones, (simplified for my question,) but there shouldn't be an error.</p>
  
  <p>Any help would be very appreciated!</p>