push dir
while not empty:
pop dir
foreach( const QFileInfo& entry, dir.entryInfoList( nameFilter, filter ) ) {
if( entry.isDir() ) {
push entry.dir();
}
else {
// ...
}
}
}
QString nameFilter( "*.txt" );
QDir::Filter filter = QDir::AllDirs | QDir::NoDotAndDotDot | QDir::Hidden | QDir::NoSymLinks;
push dir
while not empty:
pop dir
foreach( const QFileInfo& entry, dir.entryInfoList( nameFilter, filter ) ) {
if( entry.isDir() ) {
push entry.dir();
}
else {
// ...
}
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks