Is this really needed? I see why it might make sense for the visualizer. Otherwise you should never receive a paintEvent when your page isn't the active view of the stacked-widget. Not sure whether it triggers a hide-event, though.