I use QDirModel in QTreeView, now I want to filter drive like DVD or CD drive ,and only save the local system drive. I know maybe rewrite the QDirModel, but I cant . can you help me? best have the example code, very thanks.
Attachment 10748
Printable View
I use QDirModel in QTreeView, now I want to filter drive like DVD or CD drive ,and only save the local system drive. I know maybe rewrite the QDirModel, but I cant . can you help me? best have the example code, very thanks.
Attachment 10748
You can use or subclass QSortFilterProxyModel to filter out entries from the base model.