I'd like to perform a custom painting of my qgraphicsrectitem.
I don't understand the why the Rect is painted, using this code:

Qt Code:
  1. void paint (QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget){
  2. QPen p=painter->pen();
  3. painter->setPen(Qt::NoPen);
  4. QGraphicsRectItem::paint(painter,option,widget);
  5.  
  6. /*My Custom Painting*/
  7.  
  8. }
To copy to clipboard, switch view to plain text mode