Skip to content
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

Add explicit float -> int conversion for Qt #1041

Merged
merged 4 commits into from
Apr 18, 2023

Conversation

corranwebster
Copy link
Contributor

This was happening implicitly until https://bugs.python.org/issue36048 This makes it explicit, which means things should work with PyQt5 on Python 3.10.

Fixes #1037

@corranwebster corranwebster marked this pull request as ready for review April 18, 2023 15:50
Copy link
Member

@jwiggins jwiggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these really the only call sites?

@corranwebster
Copy link
Contributor Author

Are these really the only call sites?

Quite likely the only ones that have a mismatch between floats and ints. The interface between the toolkit and Enable is fairly thin (here's a control, draw your stuff in it, listen for events; plus the native scrollbar stuff).

On an unrelated note, this seems to have turned the MacOS wx tests back on somehow... I will fix before merging.

@corranwebster corranwebster merged commit 6135fea into main Apr 18, 2023
@corranwebster corranwebster deleted the fix/pyqt5-float-truncation branch April 18, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyQt5 on Python 3.10 doesn't cast float to int
2 participants