-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[ui] Work around PySide2 bug affecting property decorators #1723
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
[ui] Work around PySide2 bug affecting property decorators #1723
Conversation
PySide 5.15.1 and newer have a bug (https://bugreports.qt.io/browse/PYSIDE-1426) which results in the following error emitted on certain @Property decorators: TypeError: A constant property cannot have a WRITE method or a NOTIFY signal. Until the bug is fixed on PySide2 side workaround is to not use Property as a decorator, but as a simple function wrapper emitting the property as a class member. Fixes alicevision#1239.
79bf88b to
e725f59
Compare
|
Thanks for the PR. |
|
@fabiencastan Thanks for the answer. The patch applies to dev/qt6 branch, so probably PySide 6.x just does not have the issue. Is Qt6 support going to be merged soon? If yes, then this PR does not have any benefits and can be closed. However if it will still take some time to polish things on Qt6 branch, then it may still make sense to merge this PR, because it will still allow people to run meshroom on python 3.9. The latest Python supported by Pyside 5.14 is python 3.8 which is not present in the latest Debian stable or Ubuntu LTS. |
|
I edited my previous comment to address my bad memory. |
|
Is it still compatible with 5.14.1? If yes, I have no pbl to merge it. |
|
@fabiencastan I've checked that this PR works on PySide 5.14.1 on Python 3.8 |
|
@fabiencastan Just a friendly ping :-) |
|
Thanks @p12tic ! |
Description
PySide 5.15.1 and newer have a bug (https://bugreports.qt.io/browse/PYSIDE-1426) which results in the following error emitted on certain @Property decorators:
Until the bug is fixed on PySide2 side workaround is to not use Property as a decorator, but as a simple function wrapper emitting the property as a class member.
Fixes #1239.