Search code examples
windowsqtdirectoryqt5folderbrowserdialog

Folder chooser on Windows


How can I call the folder default windows folder chooser.

I'm using the call:

QString path = QFileDialog::getExistingDirectory(parent, "", folder, QFileDialog::ShowDirsOnly);

But this call show the dialog below:

Showed dialog

How can I choose this dialog as folder chooser?

Expected dialog


Solution

  • You did everything correctly. I just tested this on an XP with Qt 4.7.0 and it works as you expect but when testing on Windows 8 with Qt 5.0.2, I get the ordinary file open dialog.

    I suggest you log this as a bug.