what is the best way to Filter different types of files in QTreewidget/QListWidget?
-
it seems that there is no good way to filter...
i think i have to re-setup the QTreeWidget/QListWidget everytime i select a different type of filterType...because i found there is not way to use QFileSystemMode or QSortFilterModel while i use QTreeWidget/QListWidget
-
No there's not indeed, however your have QTreeView that might your needs
-
How many files/folders are you going to handle that way ?
-
Then why don't you use a QFileSystemModel ?
-
You have to use QTreeView/QListView classes when using a model like that.
-
Why can't you ?
-
Refactoring might be hard but it's generally a good thing to have a clean code base