Disabling/hiding a directory from QTreeView



  • I am using a QTreeView to populate a file directory using a QSortFilterProxyModel with the QFileSystemModel as the sourcemodel. How can I hide a particular directory from the treeview?



  • as youuse QSFPM, you can, sure.
    Just overwrite filterAcceptsRow and check for the path.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.