title: Folder browser dialog in Qt
body: <p>Is there any way to open a folder browser dialog in Qt? When I use <code>QFileDialog</code> with <code>Directory</code> file mode, even if I specify the <code>ShowDirsOnly</code> option, I get the standard file dialog. I would prefer to use a dialog that asks the user to choose a directory from a directory tree.</p>
  
  <p>Here's the PySide code I'm using:</p>
  
  <pre><code>from PySide import QtGui
  app = QtGui.QApplication([])
  dialog = QtGui.QFileDialog()
  dialog.setFileMode(QtGui.QFileDialog.Directory)
  dialog.setOption(QtGui.QFileDialog.ShowDirsOnly)
  dialog.exec_()
  </code></pre>
  
  <p>And here's the result I get on Windows 7:
  <img src="https://i.stack.imgur.com/A7Uv2.png" alt="File selection dialog"></p>