[SOLVED] change text color of QCheckBox on ubuntu
-
is there any way to change the text color of a QCheckBox on ubuntu? i already tried with the stylesheet and with the QPalette but it did not work
Edit:
I solved with the following code in the stylesheet
@QCheckBox::indicator{
color:white;
}@ -
Hi,
Can you show the code you use to check the text color ?
-
ui->checkBox->setStyleSheet("QCheckBox { color : white; }");
i also try
QPalette pal(QColor(255,255,255));
pal.setColor( QPalette::Text, QColor(255,0,0) );
pal.setColor( QPalette::Foreground, QColor(255,0,0) );
ui->checkBox->setPalette(pal);but nothing change
-
the code works with qlabel but not with qradiobutton and qcheckbox
-
Which version of Qt/Ubuntu are you using ?
-
qt 5.1.1 and ubuntu 12.04 LTS