How to file a some element in ListView?
-
Hi,
Are you using ListModel ? If so, then you can get the particulat Item using "get":http://doc.qt.io/qt-5/qml-qtqml-models-listmodel.html#get-method and then access its properties.
-
Right. To change something like color you can use that way and to call a function you will need to that in delegate.
@
function getColor(index) {
return "red"
}delegate: Rectangle {
color: getColor(index)
}
@ -
Maybe like this:
@
listview.currentIndex=1 // 1 is index which you know, listview = id of ListView
console.log(listview.currentItem.changedColor())
@