c++ - Read all files recursevly in a directory (and subdirectories) with QT -


i have done code in qt in order open directory dialog, choose directory , read files in it:

qfiledialog dialog; dialog.setfilemode(qfiledialog::directory); dialog.setoption(qfiledialog::showdirsonly); dialog.setviewmode(qfiledialog::detail); int res = dialog.exec(); qdir directory;  if (res) {     directory = dialog.selectedfiles()[0];     qstringlist fileslist = directory.entrylist(qdir::files);     qstring filename;     foreach(filename, fileslist) {         qdebug() << "filename " << filename;     } } 

the problem able read files in subdirectories of chosen directory.. know how done?


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -