Here is a Win32 executable that demonstrates the problem. The file is somewhat large (5 MB) because I included all the required DLL.
Clicking the button "Hide And Show This Window At Normal Speed" executes this code:
void MainWindow::hide_show()
{
hide();
show();
}
void MainWindow::hide_show()
{
hide();
show();
}
To copy to clipboard, switch view to plain text mode
Clicking the button "Hide And Show This Window In Slow Motion" executes this one:
void MainWindow::hide_show_slow()
{
hide();
Sleep(1000);
show();
Sleep(1000); // Here you'll have one second to see the white background of the window, before the paint event kicks in and display the gray background on top of it.
}
void MainWindow::hide_show_slow()
{
hide();
Sleep(1000);
show();
Sleep(1000); // Here you'll have one second to see the white background of the window, before the paint event kicks in and display the gray background on top of it.
}
To copy to clipboard, switch view to plain text mode
The application is styled using this stylesheet:
{
background-color: rgb(50, 50, 50);
}
{
background-color: rgb(150, 150, 150);
}
QWidget
{
background-color: rgb(50, 50, 50);
}
QPushButton
{
background-color: rgb(150, 150, 150);
}
To copy to clipboard, switch view to plain text mode
Cheers,
Franz
Bookmarks