Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
FIX: support Qt 5.15#17565
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
FIX: support Qt 5.15#17565
Uh oh!
There was an error while loading.Please reload this page.
Conversation
- QPainter.drawLine is now picky about float vs int - be more careful that we close the Qpainter out
Uh oh!
There was an error while loading.Please reload this page.
No need for map when a single list comprehension will do.Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Strange, the |
@@ -486,7 +486,7 @@ def drawRectangle(self, rect): | |||
# Draw the zoom rectangle to the QPainter. _draw_rect_callback needs | |||
# to be called at the end of paintEvent. | |||
if rect is not None: | |||
x0, y0, w, h = [pt / self._dpi_ratio for pt in rect] | |||
x0, y0, w, h = [int(pt / self._dpi_ratio) for pt in rect] |
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.
Or round? c.f.#15656 (comment)
I'm not sure myself. I think I tested 15656 with round but it caused some test failures. Did not have time to investigate.
Maybeint()
is good enough to fix this if we don't have the capacity to work outround
vs.int
.
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.
We have looked at moving more things toround
in other places (#8265) and it also caused failures. I am inclined to stay with int here as I suspect that is what is used to be doing under the hood (it is just complaining about in now).
On the other hand, this is in drawing the zoom box so it probably doesn't really matter?
timhoffm left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Modulo theint
vs.round
issue. But that's not a blocker.
Are you okay to merge now, or still wait? |
I'm OK to merge, the version checking would only be to mkae the comit message more accurate. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free tosuggest an improvement. |
Merge pull requestmatplotlib#17565 from tacaswell/fix_new_qtFIX: support Qt 5.15Conflicts:lib/matplotlib/backends/backend_qt5.py - code was very different, int cast done differently.
…-v3.2.xBackport PR#17565: FIX: support Qt 5.15
PR Summary
I may need to check the exact version we need this for more carefully. May be a pyqt, not Qt change.