Unsolved How to make QTreeView/QListView display specific folders?
-
i want to make a custom file manager that just shows specific folders.
like this screenshot: only normal folders are displayed in the treeView, and only special folders ending with .asset (or ANY folder with a specific name such as beginning with an underscore "_folder9") are diaplayed in the listView.
filtering in QTreeView/QListView? or filtering in QFileSystemModel? QSortFilterProxyModel? even customize a QAbstractItemModel? which is the best solution? AT LEAST, it works!
** this is my question on the Qt for Python channel. i think if the C++ solution works, then Python will work too.
https://forum.qt.io/topic/106568/how-to-customize-qsortfilterproxymodel-to-display-specific-folders -
@jackkkkk said in How to make QTreeView/QListView display specific folders?:
QSortFilterProxyModel
100% the way to go here
-
@vronin QSortFilterProxyModel is my current choice, but i get very strange results. could you spare some time to look at my original post, which has more details. https://forum.qt.io/topic/106568/how-to-customize-qsortfilterproxymodel-to-display-specific-folders