Razzo78
1/26/2018 - 8:43 AM

QML - Cycle listview elements

QML - Cycle listview elements, for read or modify

//Listview id: listView

for (var i = 0; i <= listView.model.count; i++){
     var elemCur = listView.model.get(i);
     
     //Reading
     console.log(elemCur.name);
     
     //Editing
     elemCur.name = "pippo";
}