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

Skip to content

Commit 51d1a84

Browse files
committed
committed Martin Teichmann's patch 1828813 to fix qt4 error messages
related to QPainter svn path=/trunk/matplotlib/; revision=4180
1 parent c5717d9 commit 51d1a84

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2007-11-09 Applied Martin Teichmann's patch 1828813: a QPainter is used in
2+
paintEvent, which has to be destroyed using the method end(). If
3+
matplotlib raises an exception before the call to end - and it
4+
does if you feed it with bad data - this method end() is never
5+
called and Qt4 will start spitting error messages - DSD
6+
17
2007-11-09 Moved pyparsing back into matplotlib namespace. Don't use
28
system pyparsing, API is too variable from one release
39
to the next - DSD

lib/matplotlib/backends/backend_qt4agg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def paintEvent( self, e ):
116116
qImage = QtGui.QImage(stringBuffer, w, h, QtGui.QImage.Format_ARGB32)
117117
p = QtGui.QPainter(self)
118118
pixmap = QtGui.QPixmap.fromImage(qImage)
119+
p = QtGui.QPainter( self )
119120
p.drawPixmap(QtCore.QPoint(l, self.renderer.height-t), pixmap)
120121
p.end()
121122
self.replot = False

0 commit comments

Comments
 (0)