-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Optional Submodules #185 #186
Conversation
Allow individual missing members from submodule
Sometimes, packages are updated natively on the OS, in this case Ubuntu. Now this member was discarded.
working nicely for me with a mix of win7, maya2017,houdini16 & nuke9. thanks! (+ big thumbs up generally for the whole Qt.py project) |
That's great to hear @tomwod! If all is as it should, you should find that Maya grants access to Qt.QtHelp, whereas Houdini 16 does not. Can you confirm? I heard they patched that up in a recent nightly, so you may not catch it. |
Qt.py
Outdated
|
||
_setup("PySide", ["QtUiTools"]) | ||
|
||
Qt.__binding_version__ = __import__("PySide2").__version__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey - i think this should be
Qt.binding_version = import("PySide").version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixed.
yep, can confirm that maya imports Qt.QtHelp ok and H16.504.20 fails i had a problem importing in a PySide only environment - think there might be a problem (my note above makes it work again for me) |
I'm running this beta on my 70000+ line Python app here now and so far so good. Will report any anomalies. |
That's encouraging, thanks for reporting back! |
Do you know if there's any way I can install this release from a I'm having difficulties with testing this release as I cannot specify
I've got dev releases of a wheel here which now require this release, but it can't install it. This prohibits me from testing this release on e.g. a larger number of machines. EDIT: Seems the only way to fix this is to make an actual PyPi release... |
Sorry, never done that. If it helps I can merge this, the master branch is in beta either way. |
Fine be me. Don't rush anything though, in case you're looking to receive more feedback first. |
Yeah, probably best to keep it unmerged for now. Can you find another way? |
Yeah. I'll manage :) |
I found something which differs from Qt.py 0.6.9 in Nuke 9.0v5: >>> import Qt
>>> Qt.__binding__
# Result: 'PySide'
>>> from Qt import QtGui
>>> QtGui.QApplication.topLevelWidgets()
AttributeError: 'module' object has no attribute 'QApplication' This works with Qt.py 0.6.9 but not with this release. |
It's a known issue, even by you. :) |
Haha! |
Actually I misread your comment as a reference to |
Actually, this was a great example of where Qt.py came to the rescue and made me aware of "bad code" which Qt.py 0.6.9 didn't find. That old |
YES! Exactly. Love this release already. :) |
As mentioned on Gitter this also fixes Problems under 3dsmax 2015 as there are also submodules missing. |
Just released the previous release as a beta, and will merge and release this one shortly as well. Usage # Install stable version
$ pip install Qt.py
# Install beta, a.k.a. pre-release
$ pip install Qt.py --pre
# Upgrade from stable to beta
$ pip install Qt.py --pre -U |
Excellent! |
This implements #185, a loosening of the strictness in such a way that (1) still only PySide2 members are present, but (2) members are not required.
This should enable use in less than ideal environments, such as certain OSs that lack various submodules or submodule members, such as QtOpenGL, or applications that may or may not expose the entirety of a binding, such as the lack of QtHelp under Houdini.
The result should be software that is robust and reliable, with a Qt.py that is more forgiving where needed.
To test
Or copy/paste this file.
Let me know what you think!