[SOLVED]QDir::EntryList
-
wrote on 24 Jul 2015, 09:40 last edited by GrahamL
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
-
wrote on 24 Jul 2015, 09:57 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.
-
wrote on 24 Jul 2015, 10:03 last edited by
Ahh Ok
Thanks
1/3