I'm using a ListView
in my Cascades app and I'm doing most of the stuff in QML. Here is the attachedObjects: [ ]
inside the ListView
:
attachedObjects: [
FmnModel {
id: fmnModel
},
FmnListModel {
id: asynkDataSource
source: "sql/fgmt.db"
query: "SELECT lists.id, lists.name, (SELECT COUNT(1) FROM tasks WHERE tasks.listid=lists.id AND tasks.status=\"Pending\") AS pendings FROM lists"
onDataLoaded: {
if(data.length > 0) {
fmnModel.insertList(data);
}
}
}
] // Attached Objects
And the code which loads the next page into the NavigationPane
:
property variant taskpaged
onTriggered: {
taskpaged = taskPageDefinition.createObject();
navPane.push(taskpaged);
taskpaged.back.connect(navPane.pop);
}
So when I click "Back" in the taskpaged
Page, the app crashes. Any idea why? Or do I need to provide more code? (If yes, which?)