I have:
QFileDialog file_dialog;
file_dialog.setFileMode(QFileDialog::Directory);
QStringList selected_directory;
selected_directory << file_dialog.getExistingDirectory();
But I cannot see any files. Is there any way to see them yet being able to select just directory?
Check the documentation.
When you are calling the
getExistingDirectorytheShowDirsOnlyflag is setUse instead the following:
The selected directories can be retrieved from the
dirNamesstring list.