How to share one QFileSystemModel with two Views?
I'm making a simple file manager. Firstly, I make two separate QFileSystemModel to show QTreeView & QListView respectively.
But, I would like to share one QFileSystemModel between them. I try with make with QSortFilterProxyModel.
But, I don't know how to filter just the folders with QSortFilterProxyModel, plz help me.
Is there another method to get like that result.
You can use Package, if you want to share one model with more than one views
What means Package?
Plz explain or point to me..
Have a look at this "wiki page":http://developer.qt.nokia.com/faq/answer/how_can_i_implement_my_own_proxy_model_that_is_more_advanced_than_just_sort.
It's almost what you want for the proxy. They use QStandardItemModel instead, but it can give you a good start.