Using QML TreeView in Qt5.5 alpha, how to create my own treemodel class?
-
I found an treeview QML example, it use qfilesystemmodel, but it is very complicated for me to learn
I understand treeview in QML only support model class derived from QAbstractItemModel
so parent, index, data should be derivedmy question is how to do that?
Thanks
-
Same question, that I have.
In QML, how do you create a model with children?
ex of what i'd want (that doesn't work):
model: ListModel { ListElement { name: "Parent" children: [ ListElement { name: "Child0" }, ListElement { name: "Child1" } ] } }