dreamer
23rd June 2008, 16:30
I'd like to perform a custom painting of my qgraphicsrectitem.
I don't understand the why the Rect is painted, using this code:
void paint (QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget){
QPen p=painter->pen();
painter->setPen(Qt::NoPen);
QGraphicsRectItem::paint(painter,option,widget);
/*My Custom Painting*/
}
I don't understand the why the Rect is painted, using this code:
void paint (QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget){
QPen p=painter->pen();
painter->setPen(Qt::NoPen);
QGraphicsRectItem::paint(painter,option,widget);
/*My Custom Painting*/
}