-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8
-
None
-
1fca1477e (dev), 50064d6cf (6.8)
Our TreeView documentation is not showing how the tree model can be created:
https://doc.qt.io/qt-6/qml-qtquick-treeview.html
Therefore, the example doesn't work (the user have to create a C++ model):
// The model needs to be a QAbstractItemModel// model: yourTreeModel
For reference
There is one example that uses a FileSystemModule.FileSystemModel as a model. This is defined in C++:
qtdeclarative/examples/quickcontrols/filesystemexplorer/qml/FileSystemView.qml
There's also a manual test. My hunch would be to use it's TestModel as a base of how to create a C++ tree view model for the TreeView documentation:
qtdeclarative/tests/manual/treeview/sidebyside
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-127016 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
576005,19 | Add an example to create and use custom tree model in quick tree view | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
581542,2 | Add an example to create and use custom tree model in quick tree view | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |