Using Qt (Qt 5.13 more precisely), I want to create a file browser, as closest as possible as the Windows Explorer one. This file browser should be as simple as possible from the point of view of code, but as complete as possible from the point of view of the functionalities.
I found that a QFileSystemModel model exists, and combined with a view, it may be used as a base for create my explorer. However I faced several serious limitations using this model. One of the most annoying is that I could found no option to show the external drives (USB drives, connected phones, ...) and the network paths (Neighbor network, ...). Setting the model to the root, I can see all my local drives, including the virtual ones (i.e those mounted with the subst command), but nothing else.
I use this code to create my model and link it to a view on my interface:
QFileSystemModel* pModel = new QFileSystemModel;
pModel->setRootPath(pModel->myComputer().toString());
ui.treeView->setModel(pModel);
And I get this result:
The 4 first entries are physical drives, and the 4 last are virtual drives. But I cannot show nothing else, despite of all my retries to configure the model.
How should I change the above code to also see the network and external drives?