You could store every item (line, rectangle etc.) as a QPainterPath allowing you to redraw the image completely, partially or modified. Simply adjust some properties of an object to modify the picture.