title: QFileDialog view folders and files but select folders only?
body: <p>I'm creating my own custom file dialog using the following code:</p>
  
  <pre><code>file_dialog = QtGui.QFileDialog()
  file_dialog.setFileMode(QtGui.QFileDialog.Directory)
  file_dialog.setViewMode(QtGui.QFileDialog.Detail)
  file_dialog.setOption(QtGui.QFileDialog.DontUseNativeDialog, True)
  </code></pre>
  
  <p>The behaviour that i'm interested in is for the user to be able to view both files and folders, but select folders only. (making files unselectable). Is that possible? </p>
  
  <p><strong>Note:</strong>
  Using the <code>DirectoryOnly</code> option is not good for me since it doesn't allow you to view files, just folders.</p>
  
  <p><strong>Edit</strong> (extra code that i forgot to add which responsible for being able to select multiple folders instead of just one):</p>
  
  <pre><code>file_view = file_dialog.findChild(QtGui.QListView, 'listView')
  if file_view:
      file_view.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
  f_tree_view = file_dialog.findChild(QtGui.QTreeView)
  if f_tree_view:
      f_tree_view.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
  </code></pre>