title: How to assign a context-variable to a property with the same name in QML?
body: <p>This is the result of the following code:</p>
  
  <p><a href="https://i.stack.imgur.com/qbob2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qbob2.png" alt="Line 1234, Line 0, Line 0, Line 0"></a></p>
  
  <h3>main.qml</h3>
  
  <pre class="lang-js prettyprint-override"><code>import QtQuick 2.8 
  
  Item {
      Reusable {
          index: 1234      // reusable with a custom index
      }   
  
      ListView {
          anchors { fill: parent; margins: 20; topMargin: 50 }
          model: 3
  
          // Reusable with an index given by the ListView
          delegate: Reusable {
              index: index // &lt;- does not work, both 'index' point to 
                           //    the index property
          }   
      }   
  }
  </code></pre>
  
  <h3>Reusable.qml</h3>
  
  <pre class="lang-js prettyprint-override"><code>import QtQuick 2.8 
  
  Text {
      property int index
      text: "Line " + index
  }
  </code></pre>
  
  <h1> Problem description:</h1>
  
  <p>The <code>ListView</code> assigns 0, 1, 2, etc. to the variable <code>index</code> on every iteration. However, because I am assigning this to a property, this variable is shadowed and I cannot access it.</p>
  
  <p>If I remove <code>property int index</code> from <code>Reusable.qml</code>, the <code>ListView</code> works, but using <code>Reusable</code> outside of the ListView does not work anymore.</p>
  
  <p>Is there a way to assign <code>index: index</code>?</p>
  
  <p>(I could rename the property which would work, but I would like to avoid that.)</p>