ListModel and item
-
My situation is a ListModel and some objects in it:
ScrollView { id: scrollView1 ListView { id: listView; model: listViewModel; delegate: listViewDelegate; } } Component { id: listViewDelegate; QQShareObject { } } ListModel { id: listViewModel; }
How can I call a function into QQShareObject objects?
I tried
listViewModel.get(0).internalFunction()
but does not work..
I need to have the current value of my QQShareObject object. -
for (var count= 0; count< listView.count; count++) {
listView.currentIndex= count
console.log(listView.currentItem.getValue())
}is not a good solution. The line
listView.currentIndex= count
changes the current selected item.
Is possible to have the value of each items without to change the item index? -
for (var count= 0; count< listView.count; count++) {
listView.currentIndex= count
console.log(listView.currentItem.getValue())
}is not a good solution. The line
listView.currentIndex= count
changes the current selected item.
Is possible to have the value of each items without to change the item index?