Following the documentation here we see that it is pretty easy for us to select a folder and return a string of the selected file. This is the easiest way to collect folders and print the value into a textfield:
QString fileName = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
QDir::currentPath(),
QFileDialog::ShowDirsOnly
| QFileDialog::DontResolveSymlinks);
ui->textEdit->setText(fileName);
Top comments (0)