Unsolved avoiding styleSheet inheritance
-
I'm applying styles to some widgets. I have 3 "boxes", created with a QWidget each, and I want them to have rounded corners and a different background color.
Inside each one, I need to have different widgets, and I'm using layouts for this.
It happens that all the children of one QWidget inherit the parent styles.
For example I use:
widget->setStylesheet( "background-color: #edcba9; border-radius: 10px;")Is it possible to set a styleSheet that has no effects on children objects?
I have some other style-related problems but I think they are all related to inheritance, for example I need to specify new style for QToolButtons since they lose any animation (hover, pressed, etc) when children of a styled widget.
-
-
FWIW this could be marked ad solved, I had the same issue and solved by setting something like:
setStylesheet("#MainWindow{background-color:#000000;color:#ffffff};}")