We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 43d1f92 + 697c909 commit a951b75Copy full SHA for a951b75
lib/matplotlib/backends/backend_qt5agg.py
@@ -23,7 +23,7 @@
23
from .backend_qt5 import draw_if_interactive
24
from .backend_qt5 import backend_version
25
######
26
-
+from .qt_compat import QT_API
27
28
DEBUG = False
29
@@ -127,7 +127,8 @@ def paintEvent(self, e):
127
QtGui.QImage.Format_ARGB32)
128
# Adjust the stringBuffer reference count to work around a memory
129
# leak bug in QImage() under PySide on Python 3.x
130
- ctypes.c_long.from_address(id(stringBuffer)).value = 1
+ if QT_API == 'PySide' and six.PY3:
131
+ ctypes.c_long.from_address(id(stringBuffer)).value = 1
132
133
pixmap = QtGui.QPixmap.fromImage(qImage)
134
p = QtGui.QPainter(self)
0 commit comments