Skip to content

Instantly share code, notes, and snippets.

@Razzo78
Last active November 26, 2018 17:46
Show Gist options
  • Save Razzo78/f5c1a290398acd8a8cd072e7aa60eb69 to your computer and use it in GitHub Desktop.
Save Razzo78/f5c1a290398acd8a8cd072e7aa60eb69 to your computer and use it in GitHub Desktop.
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";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment