enthought / pyface

pyface: traits-capable windowing framework
Other
106 stars 55 forks source link

Pyface filedialog does not use native file dialog and (thus) cannot see remote path (UNC path) #456

Open taoism-coder opened 5 years ago

taoism-coder commented 5 years ago

I tested PyQt4 QFileDialog, it uses the native FileDialog in both macOS and Windows 10 . Below is how I test PyQt4 FileDialog:

from PyQt4 import QtGui
import sys

QtGui.QApplication(sys.argv)
QtGui.QFileDialog.getOpenFileName()
sys.exit(app.exec_())

Below is how I use pyface FileDialog:

from pyface.api import FileDialog, OK
dlg = FileDialog(action='open')
if dlg.open() == OK:
    pass
corranwebster commented 5 years ago

Apparently this may be an issue with Qt: https://stackoverflow.com/questions/53410896/pyside-qtgui-qfiledialog-unc-path-issue

taoism-coder commented 5 years ago

I have tested it. PyQt4 works fine. Maybe it is the problem of PySide?

Screen Shot 2019-11-05 at 11 27 45 AM
corranwebster commented 5 years ago

Sorry - I missed that.

This is the call to the file dialog in Pyface: https://github.com/enthought/pyface/blob/master/pyface/ui/qt4/file_dialog.py#L136 It gets opened in a separate call after it is created.

Is it failing after closure, or just not allowing you to find the path? What happens with PyQt5?

taoism-coder commented 5 years ago

pyface opens a different File Dialog that are not native and cannot see the UNC or any network location.

Screen Shot 2019-11-06 at 10 55 20 AM
taoism-coder commented 5 years ago

PyQt5 also works fine.

Screen Shot 2019-11-06 at 11 04 20 AM