Failing to Sort Filesystem in QTreeview via QSortFilterProxyModel
I have a QTreeview where I am displaying all system drives using QFileSystemModel. I just want to know which function of QSortFilterProxyModel class is used to sort the local and removable drives in system. Basically I am working on a app where I need to sort them in a order.
Here is the code:
[CODE]pSystemPrimaryModel = new QFileSystemModel(this);
// Sets the model for the view to present.
This displays drives in a regular manner even when removable drive is connected as follows:
+ New Volume(D:)
+ New Volume(E:)
+ Transcend Drive(G:)[/CODE]
Basically I want to display it like follows:
Does QSortFilterProxyModel can help me achieve this or is there some other Qt Class?? If yes then I would appreciate if you could guide me :)