Other than filtering the .. and . manually, is there an “official” way to do that?
The document didn’t mention much, here’s what I use,
QDir dir (path);
foreach (const QFileInfo & fileInfo, dir.entryInfoList())
{
if (fileInfo.fileName() != ".." && fileInfo.fileName() != ".")
{
blabla
}
}
You could try to use the
QDir::NoDotAndDotDotoption ofentryInfoList:(which will give you only the files: add
QDir::Dirsfor the directories)