all_dirs << parent_folder;
QDirIterator directories
(parent_folder,
QDir::Dirs |
QDir::NoSymLinks |
QDir::NoDotAndDotDot, QDirIterator
::Subdirectories);
while(directories.hasNext()){
directories.next();
all_dirs << directories.filePath();
}
QStringList all_dirs;
all_dirs << parent_folder;
QDirIterator directories(parent_folder, QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
while(directories.hasNext()){
directories.next();
all_dirs << directories.filePath();
}
To copy to clipboard, switch view to plain text mode
Where parent_folder is the folder whose you want all of his subdirectories.
Bookmarks