-
Bug
-
Resolution: Incomplete
-
P4: Low
-
None
-
4.8.3, 5.0.0 Beta 1
The documentation for QFileSystemModel::setFilter explains that
Note that the filter you set should always include the QDir::AllDirs enum value, otherwise QFileSystemModel won't be able to read the directory structure.
However, if you only want to list the files in the current root path, then QDir::AllDirs | QDir::Files also lists the directories, and omitting the QDir::AllDirs flag causes undesirable behavior, i.e. it displays folders and files some of which are not related to the current directory, in random order. And if I try to expand some of the folders, I have errors like "QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory QFileSystemWatcher: failed to add paths: .putty"