QFileDialog view folders and files but select folders only?
I'm creating my own custom file dialog using the following code: file_dialog = QtGui.QFileDialog() file_dialog.setFileMode(QtGui.QFileDialog.Directory) file_dialog.setViewMode(QtGui.QFileDialog.Detail) file_dialog.setOption(QtGui.QFileDialog.DontUseNativeDialog, True) 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? Note: Using the DirectoryOnly option is not good for me since it doesn't allow you to view files, just folders. Edit (extra code that i forgot to add which