But it doesn't answer why you repaint the image in the paintEvent and not elsewhere. The paintEvent may be called for instance when something obscures your widget. There is no point in redrawing the image in such a situation.