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 am using treeview and I need to sort them in a order.

Here is the code:
Qt Code:
  1. pSystemPrimaryModel = new QFileSystemModel(this);
  2. pSystemPrimaryModel->setRootPath(QDir::currentPath());
  3.  
  4. proxyModel->setSourceModel(pSystemPrimaryModel);
  5. proxyModel->setDynamicSortFilter(false);
  6.  
  7. // Set the QFileSystemModel model of QTreeView to display drives
  8. ui->PrimTreeView->setModel(proxyModel);
To copy to clipboard, switch view to plain text mode 
This displays drives in a regular manner as follows:
Qt Code:
  1. + C:
  2. + New Volume(D:)
  3. + New Volume(E:)
  4. + SD_Card(F:)
  5. + Transcend Drive(G:
To copy to clipboard, switch view to plain text mode 
Basically I want to display it like follows:
Qt Code:
  1. + Local Folder
  2. + C:
  3. + New Volume(D:)
  4. + New Volume(E:)
  5. + Removable Drives
  6. + SD_Card(F:)
  7. + Transcend Drive(G:)
To copy to clipboard, switch view to plain text mode