PDA

View Full Version : Browse folder dialog



StephenR
7th September 2009, 16:36
Is there an easy way in Qt to display a select folder dialog, similar to the SHBrowseForFolder in Win32 programming? I had a quick search around and I can't seem to find anything.

jpn
7th September 2009, 16:53
See QFileDialog.

StephenR
7th September 2009, 17:32
See QFileDialog.

Ah, so I can use this with FileMode set to Directory and set the ShowDirsOnly option to true? That should do the job, although not a native "select folder" dialog of course.

jpn
7th September 2009, 18:48
Notice the list of static methods in the documentation.

StephenR
8th September 2009, 14:16
Notice the list of static methods in the documentation.

The QFileDialog::getExistingDirectory does what I want, thanks. Seems a strange name for the function, I'm not surprised I couldn't find it!