-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Comparison between integers and StandardButton fails for Python task dialogs with PySide6 #14639
Comments
It seems to be a problem for newer PySide versions. With my Qt 6.2.4 and corresponding PySide version it works without problems.
The
|
it does not work: |
OK, then the alternative is to modify Does this code snippet work for you?
|
The code snippet works. With:
the button works normally. |
OK, I will prepare a PR to handle this and #14156 Can you also check whether this works for you? #14156 (comment) |
With #14156 (comment) buttons are not even added and there is an error generated when executing
|
Thanks for testing. Yes, according to the docs PyNumber_Long in C is equal to int() in Python and will fail in your case. So, I have to additionally check if the passed object has the attribute |
Fixes FreeCAD#14639: Comparison between integers and StandardButton fails for Python task dialogs with PySide6
Fixes FreeCAD#14639: Comparison between integers and StandardButton fails for Python task dialogs with PySide6
Fixes FreeCAD#14639: Comparison between integers and StandardButton fails for Python task dialogs with PySide6
Fixes #14639: Comparison between integers and StandardButton fails for Python task dialogs with PySide6
Is there an existing issue for this?
Problem description
With PySide6, comparison between integers and StandardButton fails for Python task dialogs.
For example, in the Gmsh task panel, to make the button
Apply
works again, I need to change:to:
@wwmayer, maybe some relation with #13902?
Full version info
Subproject(s) affected?
None
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: