QFileDialog setFileMode blues

Rincewind spookyk at gmail.com
Wed Jul 29 13:35:42 CEST 2009


Heya,

I am fairly new to Python and even newer to Qt.
The problem is opening a Qt file dialog to select folders only.
QFileDialog has a nice and dandy setFileMode() function just for that.
The only trouble is that I cannot make it work.
Last thing I've tried was something like this:

        self.fd = QtGui.QFileDialog()
        self.fd.setFileMode(self.fd.FileMode(4))
        filename = self.fd.getOpenFileName()

..but it was fruitless.

Any help? Tons of internets in return!



More information about the Python-list mailing list