1. 一种样式
  1. self.Mgmt016.setStyleSheet('''background-color:rgb(255, 132, 139);border-radius: 5px; color: rgb(255, 255, 255);''')
  1. background-color:rgb(255, 132, 139); 控件颜色
  2. border-radius: 3px; 圆角效果
  3. color: rgb(255, 255, 255); 字体颜色
效果如下: 
2016/7/18 22:20:58 PyQT5 设置控件颜色(例子)
2. 第二种方式
  1. self.Mgmt017.setStyleSheet('''background-color:blue;''')
效果如下:
2016/7/18 22:20:58 PyQT5 设置控件颜色(例子)
 




相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2021-06-27
  • 2021-03-31
  • 2022-01-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
相关资源
相似解决方案