I have a treeview where I am displaying all system drives using QFileSystemModel. I am looking for much better approach where a tree view can display Local Drives in one section, Removable Drive in another and so on.
Here is the code:
It gives me the following:Qt Code:
pSystemPrimaryModel = new QFileSystemModel(this); /* Sets the directory that is being watched by the model to currentPath by installing a file system watcher on it. */ // Sets the model for the view to present. ui->PrimTreeView->setModel(pSystemPrimaryModel); // Regard less how many columns you can do this using for: for(int nCount = nColCount; nCount < pSystemPrimaryModel->columnCount(); nCount++) ui->PrimTreeView->hideColumn(nCount);To copy to clipboard, switch view to plain text mode
Image.JPG
I want to display it like the second picture shown above. How can that be achieved?
Bookmarks