I have a treeView and a tableView linked to a filesystemmodel. It works fine but I would like to show only dirs in the treeView and only files in the table view. Setting setNameFilters to a selection of files (e.g. *.txt") shows these in the tableView which is what I want. The treeView shows everything (dirs + files). Is there a way to show only dirs in the treeView independent of what I show in the tableView?

I solved this earlier by using a 2nd model for the treeView and setting this to dirs only, and then coupling the two models, but this gives me drag/drop problems (I think). Any help appreciated.