Using QML TreeView in Qt5.5 alpha, how to create my own treemodel class?
QML and Qt Quick
3
Posts
3
Posters
1.2k
Views
1
Watching
-
wrote on 2 Apr 2015, 18:56 last edited by
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
-
wrote on 3 Apr 2015, 02:00 last edited by
- I think you can do what you do in C++ for QTreeView
-
wrote on 17 Jul 2015, 18:08 last edited by Pheelbert
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" } ] } }