[Interest] double-buffering, quality drop
Alexander Semke
Alexander.Semke at web.de
Tue Feb 3 23:47:59 CET 2015
Am Dienstag, 3. Februar 2015, 11:36:55 schrieb Felix morack:
> we had a similar problem. We solved it by having the updatePixamp()
> function set a flag and doing the actual drawing the in paint() method, ie:
> [...]
This is what Michael also suggested. I tried it, the quality of the pixmap is
much better now. But how can I switch between painting on a QPixmap und on
QGraphicsItem?
Now I do in Curve::paint()
if (dirty) {
painter->begin(m_pixmap);
//drawing
painter->end();
dirty = false;
}
painter->begin(this);
drawPixmap(boundingRectangle.topLeft(), m_pixmap);
painter->end();
The second begin()-call doesn't work here since QGraphicsItem is not derived
from QPainterDevice. Did you also used QGraphicsItem?
--
Alexander
More information about the Interest
mailing list