QTreeView Categories
-
Is it possible to divide a QTreeView into sections so that each section has a title area? Possibly collapsible? I could create multiple QTreeViews, but it would be nicer to have all the data in one model.
It would look something like this (light blue is where the trees would go):
!http://s13.postimg.org/61nssh9g7/tree_view_with_categories.jpg! -
QTreeView has only one call to set a header. And it is assumed that the header is in the first row. You will need to create your own custom tree view.
If an option with multiple QTreeView is suitable for you then take a look on "QToolBox":http://qt-project.org/doc/qt-5/qtoolbox.html#details
It has multiple collapsible widgets separated by the headers. -
That looks like the QML Listview.
If you are open to use QML then have a look at the Listview docs especially the section topic has an example.
"Link to the docs":http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#example-usage