QCheckBox QSS problem
-
Hi all,
so I have QCheckBox on QDialog like this
There is has following QSS style:QDialog { background-color: #124A61; color: #e1e1e1; } QDialog#EditUserDialog QCheckBox { background-color: #124A61; color: white; border-color: white; }
but I need the border of square rectangle make white too. So I've tried
QDialog#EditUserDialog QCheckBox::indicator { border: 1px solid white; background-color: none; color: white; }
as result of
Seems all be ok, but when I try to check control by clicking mouse the check indicator is not visible and nothing happened. (May be check indicator under background of rectangle?).How can I make this correct? I need like this
-
@Alexey-Serebryakov said in QCheckBox QSS problem:
QCheckBox::indicator {
border: 1px solid white;
background-color: none;
color: white;
}When you set this, you need to specify the appearance further, otherwise the check mark will also have color
none
.Try to change settings of
QCheckBox::indicator::checked
.https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcheckbox