There's a delay between update() and the actual paintEvent() so I would clear the unpainted state in the actual paint event.