title: How do i access the currentIndex from gridview in qml and update it on changed [In QML]
body: <p>How can I get the currentIndex from the gridView and highlight it and update back the currentIndex once it's changed to another item? [IN QML]. Please let me know what is the solution.</p>
  <p>Thank you in advance!</p>
  <pre><code>GridView{
          id: colorGrid
          model: colorModelData
  
          delegate: ItemDelegate{
              id: colorcomboDelegate
              background: Rectangle {
                  id: colorRect
                  anchors.centerIn: parent
                  width: colorGrid.cellWidth * 0.6
                  height: colorGrid.cellWidth * 0.6
                  radius: width/2
                  color: colorModelData[index]  
              }
              Rectangle {
                  id:colorSelectedRing
                  anchors.centerIn: parent
                  width: colorRect.width * 1.30
                  height: width
                  radius: width/2
                  z:-1
                  visible: index=== colorGrid.currentIndex? true:false [...ERROR]
                  Rectangle {
                      id:colorSelectedBlackRing
                      anchors.centerIn: parent
                      width: colorRect.width * 1.13
                      height: width
                      radius: width/2
                  }
              }
          }
  
          currentIndex: [Need to update the current index]
    }
  </code></pre>