To anyone interested, just re-implement QGraphicsItem::Shape.