@django-Reinhard said in need help on model/view:
.. but I've no idea, how to translate a modelindex from source model to proxy model.
Ok, I found the mapping methods in AbstractProxyModel ...
... but model filtering is pretty unusable. Don't know, whether its an issue of QFileSystemModel or whether it applies to all models ...
My idea was to show only directories in treeview and only files in tableview. Actually I have one QFileSystemModel and two subclasses of QSortFilterProxyModel.
When I code filterAcceptsRow to accept directories only, I won't get any entry in treeview. I have to accept drives together with directories, although a drive is never shown in treeview.
Same happens with filterAcceptRow for the files model. When I code filterAcceptsRow to accept anything except directories, I won't get any entry in treeview.
That's some kind of ridiculous.
The root entry for the table view is a directory and the tableview shall only show the children of that entry. So why must the root entry pass the filter criteria?
It will never be shown, so from my point of view there's no reason at all.
Very strange in deed.
Lets see, what happens with self coded models ...