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.se...@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 >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest