Background-color:rgb (175175175);
Set this QSS for widgets in the UI editor,
Here is the setup again in the code
Qpalette Palette;palette.setcolor (Qpalette::background, Qcolor ("#2162a9" )); Utitlebar->setpalette (palette);
Finally show what color is not, I thought is not because added dialog resizeevent problems, but in the absence of resizeevent, still colorless,
So judging the problem is not set correctly,
If you add a resezeevent in the
Qpalette Palette;palette.setcolor (Qpalette::background, Qcolor ("#2162a9" )); Utitlebar->setpalette (palette);
This code, also can succeed, but a little awkward, finally found a problem,
Just get rid of the QSS and you can.
In another case, if you just added the QSS setting in the UI, but you still cannot explicitly do so in the dialog main form, you need to set the
Need to be aware of conflicting property settings and QSs (UI edit QSs, code Settings properties conflict)