Smudge
7th July 2006, 11:44
Hi,
Has anyone out there used
QDirModel::setNameFilters(const QStringList &filters)?
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:
mpHostPathModel->setNameFilters(QStringList() << "*");
but an attempt to turn it on with:
mpHostPathModel->setNameFilters(QStringList() << "*.jpg");
Causes the view to reset to the root directory with only a few directories available :confused:
Has anyone used it with success, can anyone give examples of how to use it as the helptext is pretty vague.
Thanks,
Andy.
Has anyone out there used
QDirModel::setNameFilters(const QStringList &filters)?
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:
mpHostPathModel->setNameFilters(QStringList() << "*");
but an attempt to turn it on with:
mpHostPathModel->setNameFilters(QStringList() << "*.jpg");
Causes the view to reset to the root directory with only a few directories available :confused:
Has anyone used it with success, can anyone give examples of how to use it as the helptext is pretty vague.
Thanks,
Andy.