QDir with nameFilters

  • Hi

    How do I use QDir::nameFilters only for files, but not on folders?
    It seems to apply for any entries.

  • Assume, Folder1 contains, file1,file2 & folder2. And folder2 contains file3.

    How will you select file3, when you can't see folder1 ??

    EDIT : typo

  • Try:

    QFileInfoList QDir::entryInfoList ( Filters filters = NoFilter, SortFlags sort = NoSort ) const;

    and set filters to: QDir::Files

    and then You can use filter on file list

    I'm not sure if this shows files from 'recursive' directories, but might work.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.