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:
QDir::Files|QDir
::Dirs|QDir
::Readable|QDir
::NoDotAndDotDot, \
QDir::Name|QDir
::DirsFirst,
this);
filemodel = new QDirModel(QStringList(), \
QDir::Files|QDir::Dirs|QDir::Readable|QDir::NoDotAndDotDot, \
QDir::Name|QDir::DirsFirst, this);
To copy to clipboard, switch view to plain text mode
This snippet doesn't show anything at all:
ffilter << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG";
QDir::Files|QDir
::Dirs|QDir
::Readable|QDir
::NoDotAndDotDot, \
QDir::Name|QDir
::DirsFirst,
this);
QStringList ffilter;
ffilter << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG";
filemodel = new QDirModel(ffilter, \
QDir::Files|QDir::Dirs|QDir::Readable|QDir::NoDotAndDotDot, \
QDir::Name|QDir::DirsFirst, this);
To copy to clipboard, switch view to plain text mode
Help appreciated, thx
Bookmarks