Accessing single items from QAbstractListModel in QML
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.
Code:
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
Re: Accessing single items from QAbstractListModel in QML
What are these objects that your model is interfacing with?
Are they accessible from QML, i.e using Q_OBJECT or Q_GADGET for defining properties?
Cheers,
_