Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
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):
andreyc last edited by
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.
Eddy last edited by
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
Thanks, I wouldn't even know where to begin with customizing the tree view in this way. Maybe I'll just keep things simple and go with the multiple tree view option.
Sorry Eddy, I didn't see your post when I typed my last post. I'll look into the link you posted. Thank you.