I am trying to make a QListView where it only shows specific folders on my computer. Note that the folders can be in separate directories. I am using QFileSystemModel for my QListView, but cannot find a method that appends a folder to the end of my QFileSystemModel. I am aware that I can filter, but that does not solve my problem, because the folders that I want to appear is not in the QFileSystemModel.
For example, here is a folder that I want to show and one that I do not want to show:
and inside the folder folder that I want to hide
, there is a file I do not want to show and a folder that I do want to show:
Is there a way to force my QFileSystemModel to include specific folders anywhere on my computer?