When I use QDir::NoDotAndDotDot, my QtDir gives me an empty string. But when I remove it all files are outputted.Any idea why this strange behaviour? And why these ".",".." appear? Thanks.
When I use QDir::NoDotAndDotDot, my QtDir gives me an empty string. But when I remove it all files are outputted.Any idea why this strange behaviour? And why these ".",".." appear? Thanks.
The default value for the filter flags is QDir::AllEntries. When you override the default flags with QDir::setFlags or QDir::entryList, you should not forget to include at least one of QDir::Dirs, QDir::Files, or QDir::Drives to get any entries.
Qt Code:
// output a list of all subdirectories except "." and ".." { qDebug() << entry << ", "; }To copy to clipboard, switch view to plain text mode
Thank you.
Bookmarks