Open jasperges opened 5 years ago
I can't find that change in the Qt documentation anywhere, as mentioned. How about just passing it as a regular argument as opposed to keyword argument?
work_file = QtWidgets.QFileDialog.getOpenFileName(
None, # parent,
"Work Files", # caption
self.root, # dir | directory
filter=filter
)[0]
Here you can find the documentation. Although everything is still 'TODO'... I'm not a big fan of not using keyword arguments, but your solution should work fine.
I'm not a big fan of not using keyword arguments,
Agreed, rather explicit as opposed to implicit.
If it has been directory
consistenly across PySide2 / PyQt5 versions I guess we should just end up matching it and make sure Qt.py
is updated for Avalon with the fix.
As far as I can tell PyQt5 uses directory
everywhere, where PySide2 (and also PyQt4) use dir
.
@jasperges Are we able to resolve this by now? Or has it already been solved? :)
@BigRoy The issue is still there. But your proposed solution works fine. Actually I'm moving to PySide2 now, mainly to be in line with other DCC's. Maya, Nuke, Houdini etc. use PySide2 right?
When using PyQt5 the Work Files app crashes on
on_browse_pressed
, because it usesdirectory
instead ofdir
forQFileDialog.getOpenFileName
(see here).The best option IMHO would be to address this in Qt (see this issue). But that would require some more work as most members of
QFileDialog
are affected. As a temporary solution I useif Qt.IsPyQt5: ...
in my personal branch. Should we add this 'fix' inworkfiles/app.py
or wait for this to be addresses in Qt and update Qt invendor
?