Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change QCheckBox text label color in Qt?

I'm unable to change the color of Qcheckbox in QT, can somebody help me with code to change color of check box text label. I have tried Qpalette.. And im using QT4.7.4 version..

like image 402
sai Avatar asked Jun 22 '12 09:06

sai


Video Answer


1 Answers

You could use stylesheets.

e.g:

checkBox->setStyleSheet("QCheckBox { color: red }");

For more details check the style sheets in Qt Reference and the stylesheets documentation

like image 178
pnezis Avatar answered Sep 18 '22 20:09

pnezis