Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Using QTreeView to show catagories / tags
Phill last edited by
I have a data structure where each item can have a number of tags. What I would like to do is use a QTreeView to list each tag, upon expanding each individual tag, the tree view will show the items identified with this.
The problem comes when implementing the parent method, there is no way to know which is the parent index the model is referring to.
VRonin last edited by
I have a data structure
Is this "data structure" already a
If the answer is no then just fill in a
QStandardItemModelmanually with your data. no need to reimplement a model.
If the answer is yes then you need a
QAbstractProxyModelsubclass. I'm actually working on this proxy but it's not easy. I'll update this post once I implemented it