Making File Dialog only accept directories

Posted by matt on Stack Overflow See other posts from Stack Overflow or by matt
Published on 2010-04-18T14:26:21Z Indexed on 2010/04/18 14:33 UTC
Read the original article Hit count: 353

Filed under:
|
|
|

I want to have a file dialog only allow directories, here's what I've been trying:

fileDialog = QtGui.QFileDialog() fileDialog.setFileMode(QtGui.QFileDialog.ShowDirsOnly) filename = fileDialog.getOpenFileName(self, 'Select USB Drive Location'))

Thank You

© Stack Overflow or respective owner

Related posts about pyqt4

Related posts about filedialog