QFileSystemModel and QTreeView showing dirs only. How to hide expansion marks against the empty dirs?
问题 I'm building somewhat like standard file explorer - left pane is for folders tree, and the right one to display files within selected folder. QTreeView with QFileSystemModel is used to display folders. Model's filter is set to QDir::Dirs | QDir::NoDotAndDotDot to list dirs only, no files. I want to display expansion marks only against the folders with subfolders, i. e. if some dir is empty or contains only files, it shouldn't be expandable. But instead, tree view keeps expansion marks against