Unsolved How to get to an unexpanded path's index in Treeview (with FileSystemModel) without expand the treeview?
-
I am using Pyqt to develop a server maintenance application.
I use a CheckableFileSystemModel override the QFilesystemmodel as the local file modeI. It adds checkbox before the items in the treeview.
Sometimes I want to use a list of paths to update the checkstatus of checkbox (and show them to the user). It does not work when the path has not been expanded. As QFilesystemmodel is a lazy model which means it will not walk the directory. This make me not able to update the CheckStatus of an unexpanded path, unless recursively expanding the treeview (which will make the GUI stuck for a long time).
Is there any better way to get to an unexpanded path's index in Treeview (with FileSystemModel) without expand the treeview?Or to add node to treeview without expand it?