-
Notifications
You must be signed in to change notification settings - Fork 95
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
Ensure Qt height and width calls are given int values #1911
Conversation
This is needed for Python 3.10+ and some versions of PyQt/PySide.
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.
Just a couple of passby comments. But mainly I wonder if we need to consider rounding instead of just getting the integer part.
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.
A few more comments to consider.
I think I've addressed everything here. Assuming that PRs pass, this is good for re-review. |
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.
👍
This is needed for Python 3.10+ with some versions of PyQt/PySide. A change to the Python C API which comes into effect in 3.10 means that certain C API calls which previously accepted floats and silently truncated now raise.
Fixes #1886 and possibly some others.
Note that this looked only for height/width. There may be other places where we are supplying a float when expecting an int.
Checklist