[SOLVED]QDir::EntryList
-
Hi
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 trickQDir 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 dotdotIs this the correct behavior or have I misunderstood something?
Thanks
-
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.
-
Ahh Ok
Thanks
2/3