Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Make item if QTreeView or QStandartItem unvisible
How can i make item of QTreeView or QStandartItem unvisible?
koahnig last edited by
QTreeView has the "hide slot":http://developer.qt.nokia.com/doc/qt-4.8/qwidget.html#hide "see the list of all members":http://developer.qt.nokia.com/doc/qt-4.8/qtreeview-members.html
QStandardItem does "not have hide slot":http://developer.qt.nokia.com/doc/qt-4.8/qstandarditem-members.html
No no, you dont understud:
I need to do some item of QTreeView unvisible, you offer do QTreeView unvisible
andre last edited by
[quote author="Ruzik" date="1329709495"]No no, you dont understud:
I need to do some item of QTreeView unvisible, you offer do QTreeView unvisible[/quote]
Then, your formulation of your question was off, because you clearly asked for both:
[quote author="Ruzik" date="1329677314"]How can i make item of QTreeView or QStandartItem unvisible?
Anyway, as koahnig already said: items in an item view don't have a visible property or something like that. You therefore have two options:
Remove the item in question from your model
Use a SortFilterProxyModel between your model and your view, and filter out the item in question.
Which approach is best, depends on your exact case.
I already try to use QSortFilterProxyModel and сonfronted with the question(http://developer.qt.nokia.com/forums/viewthread/14401/#74631)
No matter what thank you for your help!