how to change QCheckBox text label color in Qt?

后端 未结 4 772
别跟我提以往
别跟我提以往 2020-12-11 05:04

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

4条回答
  •  旧巷少年郎
    2020-12-11 06:01

    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

提交回复
热议问题