Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
I want to hide a specific node in QTreeView - C++ - QT
i want to hide a specific node in QTreeView.
For example i have a node called "Positions" in my QTreeView. I want to hide this node, so that the user can't see it by his name.
Is it possible? And if yes it is possible with the name or only with the index?
JonB last edited by
Well, I don't know if this is the best way, but you can always use a
QSortFilterProxyModelto filter data items out. Might depend on what kind of "hide" you mean in a treeview.
With "hide" i want to achive that the user can't see the whole node i want to hide. I look to QSortFilterProxyModel i think with that i can be solved :)
JonB last edited by JonB
If it is a node and you want its children to be filtered out too, you may need to set
Or, you might not want that, and better left on default
Thank you @JonB that is exactly what i want, to filter the node with its children out.