Skip to content

Commit c12c4ff

Browse files
jklymaktacaswell
authored andcommitted
Backport PR #17600: FIX: work with PyQt 5.15
Merge pull request #17600 from tacaswell/mnt_more_qt515_fixes FIX: work with PyQt 5.15 Conflicts: lib/matplotlib/backends/backend_qt5.py - on this branch the blitting code is still in backend_qt5agg.py
1 parent d91fa3a commit c12c4ff

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ def start_event_loop(self, timeout=0):
452452
raise RuntimeError("Event loop already running")
453453
self._event_loop = event_loop = QtCore.QEventLoop()
454454
if timeout > 0:
455-
timer = QtCore.QTimer.singleShot(timeout * 1000, event_loop.quit)
455+
timer = QtCore.QTimer.singleShot(int(timeout * 1000),
456+
event_loop.quit)
456457
event_loop.exec_()
457458

458459
def stop_event_loop(self, event=None):

lib/matplotlib/backends/backend_qt5agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def blit(self, bbox=None):
8585
bbox = self.figure.bbox
8686

8787
# repaint uses logical pixels, not physical pixels like the renderer.
88-
l, b, w, h = [pt / self._dpi_ratio for pt in bbox.bounds]
88+
l, b, w, h = [int(pt / self._dpi_ratio) for pt in bbox.bounds]
8989
t = b + h
9090
self.repaint(l, self.renderer.height / self._dpi_ratio - t, w, h)
9191

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy