flat属性用于确认按钮边框是否凸起,如果为False则凸起,如果为True则边框与背景是平坦的。
默认值为False,如果设置为True,则除非按下按钮,否则大多数样式都不会绘制按钮背景。通过使用setAutoFillBackground()可用于确保使用 QPalette.Button的画笔填充背景。

可以通过isFlat() 、setFlat(bool)来访问或设置该属性。


PyQt(Python+Qt)学习随笔:Designer中PushButton按钮flat属性

博客地址:https://blog.csdn.net/LaoYuanPython

老猿Python博客文章目录:https://blog.csdn.net/LaoYuanPython/article/details/98245036

相关文章:

  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案