1 Attachment(s)
Adding SubColumn to the root item in the QTreeView
I have implemented a QTreeView using the SimpleTreeModel example.
But now I want to add two sub-columns in one root item. For example, Entries "item A" and "Value" will be inside one root entry "Data A". Similarly Entries "item B" and "Value" will be another root entry "Data B".
Can anybody tell how it can be done?
Thanks in advance :)
Re: Adding SubColumn to the root item in the QTreeView
You either change your custom model to present the tree structure that way, or you overlay a QAbstractProxyModel sub-class to do this rearrangement in the fly. Which you choose will depend on where else the model might be used and what your are trying to achieve.