永发信息网

怎样设置使得QPushButton上的中文有颜色

答案:2  悬赏:80  手机版
解决时间 2021-04-05 18:09
  • 提问者网友:酱爆肉
  • 2021-04-05 07:16
怎样设置使得QPushButton上的中文有颜色
最佳答案
  • 五星知识达人网友:零点过十分
  • 2021-04-05 08:21
QPalette pal = pushButtonCancel->palette();
pal.setColor(QColorGroup::ButtonText,QColor(255,0,0));
pushButtonCancel->setPalette(pal);
全部回答
  • 1楼网友:佘樂
  • 2021-04-05 08:53
ui->pushbutton->setstylesheet(                 "qpushbutton{background-color:green}"                 "qpushbutton:checked{background-color:red}");
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯