Slash200
12th December 2018, 08:38
Hello,
I have a c++ class derived from QAbstractListModel which I use as my Datamodel for QML.
It has hundrets of objects in it which I want to access directly in QML.
Using the whole model e.g. in a list ist working.
ListView {
width: 100; height: 800
model: dataSourceModelObject
delegate: Text { text: name + " " + value}
}
But I want to access single objects of this ListModel by the ID of the object. Is this possible?
regards
I have a c++ class derived from QAbstractListModel which I use as my Datamodel for QML.
It has hundrets of objects in it which I want to access directly in QML.
Using the whole model e.g. in a list ist working.
ListView {
width: 100; height: 800
model: dataSourceModelObject
delegate: Text { text: name + " " + value}
}
But I want to access single objects of this ListModel by the ID of the object. Is this possible?
regards