• 5364阅读
  • 1回复

[提问]pushButton能设置边缘不失效,并且设置背景颜色嘛? [复制链接]

上一主题 下一主题
离线bingcaihuang
 

只看楼主 倒序阅读 楼主  发表于: 2011-08-07
如题,一般pushButton设置背景颜色都要设置[font='Times New Roman']isFlat()为true才能正常显示出颜色,请问能否设置[font='Times New Roman']isFlat()为false并且设置背景颜色呢?
离线wxj120bw

只看该作者 1楼 发表于: 2011-08-07
回 楼主(bingcaihuang) 的帖子
看下面的说明 你就得到答案来了
flat : bool

This property holds whether the button border is raised.

This property's default is false. If this property is set, most styles will not paint the button background unless the button is being pressed. setAutoFillBackground() can be used to ensure that the background is filled using the QPalette::Button brush.
快速回复
限100 字节
 
上一个 下一个