How to Create a Model Like QFilesystemModel
Solved
General and Desktop
-
I would like to create a model like QFilesystemModel. I am fetching information from a database about directories which I would like to display in a QTreeView. I'm able to do this with QAbstractItemModel, but I can't figure out how to implement the lazy loading aspect of QFilesystemModel. I assume QFileSystemModel is only loading children for parents that are expanded. There are way too many subdirectories within subdirectories to load it all up front. I'd appreciate any help with this.
-
Hi,
The best way to find out is to take a look at the sources of QFileSystemModel :)