Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5b39ce

Browse files
authored
Merge pull request #12096 from meeseeksmachine/auto-backport-of-pr-12092-on-v3.0.x
Backport PR #12092 on branch v3.0.x (Update backend_qt5agg to fix PySide2 mem issues)
2 parents 8f297fb + 6b150e2 commit b5b39ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_qt5agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def paintEvent(self, event):
6464
painter.drawImage(origin / self._dpi_ratio, qimage)
6565
# Adjust the buf reference count to work around a memory
6666
# leak bug in QImage under PySide on Python 3.
67-
if QT_API == 'PySide':
67+
if QT_API in ('PySide', 'PySide2'):
6868
ctypes.c_long.from_address(id(buf)).value = 1
6969

7070
self._draw_rect_callback(painter)

0 commit comments

Comments
 (0)