option->exposedRect = QRectF(0,0,width/2,height/2);
QRectF QStyleOptionGraphicsItem::exposedRectThis variable holds the exposed rectangle, in item coordinates.Make use of this rectangle to speed up item drawing when only parts of the item are exposed. If the whole item is exposed, this rectangle will be the same as QGraphicsItem::boundingRect().
painter->setClipRect(rect);