-
Notifications
You must be signed in to change notification settings - Fork 345
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
Natron 2.5 Qt.Alignment Flags Unrecognized (As Int) #854
Comments
I'm getting these seems issues in Natron 2.5.0. Furthermore, I also got this error when trying to integrate OpenPype pipeline: Object has no Or technically -it could be related to some changes required for QtPy as this PR for OpenPype does to support PySide6: ynput/OpenPype#4255 - however that explicitly mentions it'll make it incompatible with |
Confirmed on macOS (the app also crashes after the exception), works fine on 2.4. |
Oddly enough, only today realized it even had PySide included. Agreement, and stressing, what @BigRoy addresses, that Natron needs to upgrade to PySide6. Especially making use of Python3.10 Over the past week, a fellow developer and I have been upgrading our work to 2023 VFX standards. @rodlie While updating to make use of PySide6, discovered PySide(x) becomes VERY particular with input types. Yes I'm thinking out loud this morning while trying to figure out. Thanks for your input everyone. |
Oh, and oddly enough, the Natron documentation states to use qtpy as the PySide importing. |
Well it does seem to support PySide in Natron. O.k. That stops it from crashing Natron. But have a feeling since the rest of the modules used might be pulling from PySide2/6. Yes. Brain storming rhetorically. |
when building Natron with Qt4, we use the last qtpy version that supported PySide/Qt4 (qtpy==1.11.2) |
We need some help packaging Natron 2.6 with Qt5/PySide2 on Windows and Linux. The docker image to build it on Linux is ready with Qt5, so that one should be easy. |
And btw PySide2 5.15.2.1 is supposed to support Python 3.10 |
It is wonderful to see Natron 2.5 with Python 3 support.
However once python tools with Qt UIs were introduced, Natron did not allow python scripts to recognize QtCore.Qt.AlignmentFlags correctly.
Python exception: PySide.QtCore.Qt.AlignmentFlag' object cannot be interpreted as an integer
In the python apps for Natron, if applying an alignment flag to a Qt widget, discovered that the flag needed to be forced into an int() or else it would error out (as above)
When doing a common Qt Flag function, such as combining flags, it fails with the same problem.
qtpy is installed as advised and in use.
It feels like an incomplete binding of the Python functions or methods.
Did attempt to force it. Coding to use int(Qt.AlignmentFlag) in place of Qt.AlignmentFlag. However that breaks all other code that uses shared UI code.
So far, it seems only to be the Qt.AlignmentFlags, and only in Natron 2.5
Same code and UI works in 2.4.4 and before.
Looking at a flag, e.g.
dir(QtCore.Qt.AlignRight)
, it seems to have all the expected methods and attributes. (__le__, __int__, __or__, etc
). However in use it seems to not use the class methods. as expected.The text was updated successfully, but these errors were encountered: