Compare what I wrote:
to what you did in your code:remove the style sheet from Dialog1.ui and modify the palette in Designer so that QPalette::Window is Red.
Qt Code:
To copy to clipboard, switch view to plain text mode
You can actually make that palette adjustment to QPalette::Window in Designer if you wish. The QPalette::Window comes from the docs linked earlier.
The other thing I did in your project was apply a layout to everything in your Dialog1. I do not think this will make a difference to the painting only the layout and usability.
Bookmarks