November 2018
Intermediate to advanced
1150 pages
24h 11m
English
Binding the ListView model to the list is then just a one-liner in Page1.qml:
// Page1.qml...Page1Form { addItemButton.onClicked: addGroceryItem.run(addItemField.text) groceriesListView.model: groceryItems.list groceriesListView.onItemRemoved: removeGroceryItem.run(itemType) Component.onCompleted: checkAvailableGroceries.run()}
The list is initially assigned to the model property. Every time the listChanged signal is emitted, the model value is updated form the list value. This happens to the already introduced property binding mechanism: upon update, there is no need to poll data.
Read now
Unlock full access