SetText of QCheckBox in stylesheet ?
-
IS it possible to set Text of QCheckBox in stylesheet dependend on state ?
Already using similar approach to change indicator of checkbox :@ ui->checkBox->setStyleSheet(QString("QCheckBox::indicator {"
"image: url(:/images/checkbox_circle_green.png);"
"}"
"QCheckBox::indicator:unchecked {"
"image: url(:/images/checkbox_circle_red.png);"
"}"
));
@I would like to set text "connect" / "disconnect" on state unchecked / checked.
-
Hi,
IIRC, you can change a QObject property using something like
@QPushButton { qproperty-iconSize: 20px 20px; }@
It should be adaptable to QCheckBox's text