QTreeView with QFileSystemModel is not working properly
问题 I set QFileSystemModel root path and then set it as QTreeView model, but if I try to find index of a speciffic file it is giving me D: I am sure the file is there ! self.model = QtWidgets.QFileSystemModel() self.model.setNameFilters(['*.ma']) self.model.setFilter(QtCore.QDir.Files)#QtCore.QDir.AllDirs | QtCore.QDir.NoDotAndDotDot | QtCore.QDir.AllEntries) self.model.setNameFilterDisables(False) self.model.setRootPath(path) self.tree_local_file.setModel(self.model) self.tree_local_file