Setting background color for QCheckBox::indicator resets all other styling
-
I have a QCheckbox appearing on a form with a non-white background, but want the indicator to appear with a white background. My first guess was that this could be achieved inside my application stylesheet by adding:
QCheckBox::indicator {
background-color: white;
}However, this completely ruins the tickbox: the depth-effect is gone, and also no checkmark appears anymore when the checkbox is selected.
What am I doing wrong?
-
Hi,
Nothing really wrong, QWidget using style sheets are rendered by a special style. With style sheets you can customize things that might not be done with the native style.