Kraut~salat
25th December 2008, 01:05
Hi,
I want to create a QTreeView that only shows dirs and JPEG-files. When I pass end empty filter QStringList to the QDirModel constructor I can see all Dirs and Files, as expected. But when I try the same thing with a non-empty StringList I don't see anything.
This snippet shows everything (since I create an empty StringList:
filemodel = new QDirModel(QStringList(), \
QDir::Files|QDir::Dirs|QDir::Readable|QDir::NoDotA ndDotDot, \
QDir::Name|QDir::DirsFirst, this);
This snippet doesn't show anything at all:
QStringList ffilter;
ffilter << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG";
filemodel = new QDirModel(ffilter, \
QDir::Files|QDir::Dirs|QDir::Readable|QDir::NoDotA ndDotDot, \
QDir::Name|QDir::DirsFirst, this);
Help appreciated, thx
I want to create a QTreeView that only shows dirs and JPEG-files. When I pass end empty filter QStringList to the QDirModel constructor I can see all Dirs and Files, as expected. But when I try the same thing with a non-empty StringList I don't see anything.
This snippet shows everything (since I create an empty StringList:
filemodel = new QDirModel(QStringList(), \
QDir::Files|QDir::Dirs|QDir::Readable|QDir::NoDotA ndDotDot, \
QDir::Name|QDir::DirsFirst, this);
This snippet doesn't show anything at all:
QStringList ffilter;
ffilter << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG";
filemodel = new QDirModel(ffilter, \
QDir::Files|QDir::Dirs|QDir::Readable|QDir::NoDotA ndDotDot, \
QDir::Name|QDir::DirsFirst, this);
Help appreciated, thx