[Interest] Howto keep a pushButton style while changing the backgroundcolor

anton antonxx at gmx.de
Mon Apr 25 18:52:42 CEST 2016


Hi,

I am experimenting with qt 5.6.0.

1. I create a QtWidgts application.
2. I drop a pushButton in the Main Window
3. I change the styleSheet of the QMainWindow 
   to: background-color: rgb(85, 170, 255);

Now the button has the same background color too.

How can I leave the style of the pushbutton as it is?
(without inheriting the blue background color from the QMainWindow)

I didn't find any solution and I do not want to set a background bitmap
for such a simple problem.

What point did I miss?

Thanks for a hint.

Anton




More information about the Interest mailing list