GrahamL last edited by GrahamL
If I want to get a list of all files and sub folders in a folder, but excluding dot and dotdot I thought that this should do the trick
QDir myDir("somepath"); QStringList files = myDir.entryList(QDir::NoDotAndDotDot);
However, this seems to return no strings
Removing the filter returns the list as expected but including dot and dotdot
Is this the correct behavior or have I misunderstood something?
koahnig last edited by
QDir myDir("somepath"); QStringList files = myDir.entryList(QDir::AllEntries|QDir::NoDotAndDotDot);
This should work. You need to specify what you want to see and than you add what should be excluded.
GrahamL last edited by