[PyQt] QPainter warnings when resizing a QWebView element

Brian Zambrano brianz at gmail.com
Fri Jul 22 08:36:14 BST 2011


I'm attempting to use flot, a jquery/javascript plotting library to draw
plots in a QWebView.  Everything goes well except that I need to resize the
plot as the window resizes.  I'm doing this in Javascript, of course.  Once
the resize occurs and my redraw callback fires, I get a warning over and
over:

QPainter::end: Painter ended with 2 saved states

A short program program to reproduce the issue is here:
http://pastebin.com/tA4xSMLC

When I comment out the redrawing javascript code, which is using the canvas
tag, the warnings disappear.  I suspect it's something with the canvas
element.

Is that warning something to be concerned about?

BZ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110722/26703327/attachment.html>


More information about the PyQt mailing list