PDA

View Full Version : how can i list of files to QFileSystemModel?



aurora
13th February 2012, 05:34
I am using QFileSystemModel, with list view...Its working fine, displaying all the files in a particular directory...
But now i want to display a particular set of files, (not all the files in that folder, i cant set filter)...
I have a list of all those files....how can i display them in that list view?

Lykurg
13th February 2012, 06:56
QFileSystemModel::setNameFilters() and it is a model after all, so you can use QSortFilterProxyModel.

aurora
13th February 2012, 07:28
Thank u ....i used QFileSystemModel::setNameFilters (QStringList)
But problem is that....model still contains the all the entries(unfiltered entries are disabled).....cant i able to display only filtered entries?