First you need to catch that click, so use
onTriggered: {
//use this to get data from your click
var myData = dataModel.data(indexPath);
}
Now myData
will have title
and file
stored. But you can't (at least not that I know of) open QML without defining it first. So use this:
attachedObjects: [
ComponentDefinition {
id: mitem1
source: item1.qml
},
ComponentDefinition {
id: mitem2
source: item2.qml
} //etc
]
And then call something like this (you can get file name from myData.file
so use that to call the correct ID) from onTriggered
navigationPane.push(mitem1.createObject());
oh, and you need to set up ID for NavigationPane (id:navigationPane
)