[Qt-interest] QPainter warnings when resizing a QWebView element

Brian Zambrano brianz at gmail.com
Fri Jul 22 21:10:16 CEST 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, on every resize:

QPainter::end: Painter ended with 2 saved states
QPainter::end: Painter ended with 2 saved states
QPainter::end: Painter ended with 2 saved states
....

One caveat, I'm doing this in PyQt, but the error looks like it's from Qt.

A short PyQt 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.

What's going on to produce this warning?

BZ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110722/6b7424f2/attachment.html 


More information about the Qt-interest-old mailing list