nucleic / enaml

Declarative User Interfaces for Python
http://enaml.readthedocs.io/en/latest/
Other
1.54k stars 132 forks source link

File dialog problem with PySide: QFileDialog has no attribute 'getOpenFileNameAndFilter'. #55

Closed WarrenWeckesser closed 11 years ago

WarrenWeckesser commented 11 years ago

In PySide, QFileDialog does not have the method getOpenFileNameAndFilter.

To see the problem, run the 'file_dialog.enaml' example (in examples/widgets), and click on the Browse button. Here's the traceback that I get:

$ enaml-run file_dialog.enaml 
Traceback (most recent call last):
  File "/home/warren/local_anaconda_enaml/lib/python2.7/site-packages/enaml-0.8.0-py2.7-linux-x86_64.egg/enaml/qt/q_deferred_caller.py", line 38, in _onPosted
    callback()
  File "/home/warren/local_anaconda_enaml/lib/python2.7/site-packages/enaml-0.8.0-py2.7-linux-x86_64.egg/enaml/qt/q_deferred_caller.py", line 56, in <lambda>
    f = lambda: callback(*args, **kwargs)
  File "/home/warren/local_anaconda_enaml/lib/python2.7/site-packages/enaml-0.8.0-py2.7-linux-x86_64.egg/enaml/qt/qt_file_dialog.py", line 30, in exec_dialog
    path, selected_filter = QFileDialog.getOpenFileNameAndFilter(
AttributeError: type object 'PySide.QtGui.QFileDialog' has no attribute 'getOpenFileNameAndFilter'

Note: I built enaml using the changes in https://github.com/nucleic/enaml/pull/53 and https://github.com/nucleic/enaml/pull/54. Without them, other errors will occur before this one.

sccolbert commented 11 years ago

This is a duplicate of #29, which I just re-opened.

WarrenWeckesser commented 11 years ago

OK, I'll close this one.