[Interest] double-buffering, quality drop
Felix morack
felixover at gmail.com
Wed Feb 4 11:22:15 CET 2015
not sure how the graphicsitem comes into all of this, but no you cant draw
on it. you can draw on a QGraphicsWidget or you can derive from
QGraphicsItem and draw in its paint() method.
2015-02-03 23:47 GMT+01:00 Alexander Semke <Alexander.Semke at web.de>:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150204/245a4c1d/attachment.html>
More information about the Interest
mailing list