title: How to access delegate properties in ListView using index
body: <p>I want to access delegate properties in <code>ListView</code>. I've tried with <code>contentItem</code> but sometimes it's <code>undefined</code>.</p>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>ListModel{
              id: modeldata
              ListElement{
                  name:"don"
                  rank:1
              }
              ListElement{
                  name:"shan"
                  rank:2
              }
              ListElement{
                  name:"james"
                  rank:3
              }
              ListElement{
                  name:"jeggu"
                  rank:4
              }
          }
          Component{
              id: delegateitem
              Row {
                  property int count: rank
                  Rectangle{
                      width: 100
                      height: 50
                      Text{
                          anchors.centerIn: parent
                          text: name
                      }
                  }
              }
          }
          ListView{
              id: listview
              focus: true
              anchors.fill: parent
              model: modeldata
              delegate: delegateitem
              onCurrentIndexChanged: {
          console.log("position",currentIndex)
          console.log("property",contentItem.children[currentIndex].count);
              }
          }
  </code></pre>
  
  <p><strong>Problem invalid output at position 1</strong></p>
  
  <pre><code>qml: position 0
  qml: property 1
  qml: position 1
  qml: property undefined
  qml: position 2
  qml: property 2
  qml: position 3
  qml: property 3
  </code></pre>