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:
Qt Code:
  1. filemodel = new QDirModel(QStringList(), \
  2. QDir::Files|QDir::Dirs|QDir::Readable|QDir::NoDotAndDotDot, \
  3. QDir::Name|QDir::DirsFirst, this);
To copy to clipboard, switch view to plain text mode 

This snippet doesn't show anything at all:
Qt Code:
  1. QStringList ffilter;
  2. ffilter << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG";
  3. filemodel = new QDirModel(ffilter, \
  4. QDir::Files|QDir::Dirs|QDir::Readable|QDir::NoDotAndDotDot, \
  5. QDir::Name|QDir::DirsFirst, this);
To copy to clipboard, switch view to plain text mode 

Help appreciated, thx