I am trying to list all subdirectories which are inside a directory(which is chosen from combobox). Now I can show list of directories in combobox . I want to select one of those directory and list every sub-dirs( inside this selected dir) in textedit. I don't know how can I list the subdirectories when I choose a directory from combobox.Here is my current code.
QDir directory = QFileDialog::getExistingDirectory(this, tr("Open Directory"),"/home", QFileDialog::ShowDirsOnly| QFileDialog::
DontResolveSymlinks);
ui->comboBox->setMinimumWidth(500);
QStringList files = directory.entryList(QDir::Files);
ui->comboBox->addItems(files);
I would appreciate any help. Thanks