[SOLVED] Eliminating main window transition (resize) "jump"
-
Consider the following snippet (connected to a button->clicked() for example)
@void MainWindow::toggleWidget()
{
if(widget->isVisible()) {
widget->hide();
//...do something else also ...
} else {
widget->show();
//...do something else also ...
}//end if
}//toggleWidget@The transition from hidden to shown is nice and smooth as the main window adjusts its size to accommodate the widget. However, the transition from shown to hidden makes the main window "jump". I understand why this happens (the main window's repainted to accommodate the change as it returns to its original size), but would like to know if there is a way to minimise this effect or eliminate it altogether?
Thanks!
-
Thanks a lot! That did exactly what I wanted. So simple, so perfect, pure zen :)