Keep Your drawing inside boundingRect() or in Your case exposed area. Probably in this case this will be the same for parent widget interaction i.e. mowing widget but will change when painting separate elements inside .
Anyway issue is with Your drawing of border.
Zoom in image to see that each rectangle is inside boundingbox().