专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > QT开发

qt按钮字体颜色改不了解决方法

发布时间:2010-05-30 21:33:51 文章来源:www.iduyao.cn 采编人员:星星草
qt按钮字体颜色改不了
程序如下,请高手指教,谢谢
QPalette pal1 = ui->pushButton_1->palette();
  pal1.setColor(QPalette::ButtonText,QColor(255,0,0));
  setPalette(pal1);

------解决方案--------------------
多看看Manual:

Warning: Some styles do not use the palette for all drawing, for instance, if they make use of native theme engines. This is the case for both the Windows XP, Windows Vista, and the Mac OS X styles.


Style sheets let you perform all kinds of customizations that are difficult or impossible to perform using QPalette alone
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: