~ubuntu-branches/ubuntu/utopic/python-traitsui/utopic

« back to all changes in this revision

Viewing changes to traitsui/qt4/directory_editor.py

  • Committer: Package Import Robot
  • Author(s): Varun Hiremath
  • Date: 2012-04-23 16:05:43 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20120423160543-bgafgw04y68arfjn
Tags: 4.1.0-1
* New upstream release
* Bump Standards-Version to 3.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    def _create_file_dialog ( self ):
45
45
        """ Creates the correct type of file dialog.
46
46
        """
47
 
        dlg = QtGui.QFileDialog(self.control.parentWidget())
 
47
        dlg = QtGui.QFileDialog(self.control)
48
48
        dlg.selectFile(self._file_name.text())
49
49
        dlg.setFileMode(QtGui.QFileDialog.Directory)
 
50
        dlg.setOptions(QtGui.QFileDialog.ShowDirsOnly)
50
51
 
51
52
        return dlg
52
53