Hi,

Has anyone out there used
Qt Code:
  1. QDirModel::setNameFilters(const QStringList &filters)
To copy to clipboard, switch view to plain text mode 
?

I have been trying to set a basic toggle filter on my View to display directories and jpegs in a given path, turning the filter off seems to work with:

Qt Code:
  1. mpHostPathModel->setNameFilters(QStringList() << "*");
To copy to clipboard, switch view to plain text mode 

but an attempt to turn it on with:

Qt Code:
  1. mpHostPathModel->setNameFilters(QStringList() << "*.jpg");
To copy to clipboard, switch view to plain text mode 

Causes the view to reset to the root directory with only a few directories available

Has anyone used it with success, can anyone give examples of how to use it as the helptext is pretty vague.

Thanks,
Andy.