2016/7/18 22:20:58 PyQT5 设置控件颜色(例子)

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); 字体颜色
效果如下: 
2. 第二种方式
  1. self.Mgmt017.setStyleSheet('''background-color:blue;''')
效果如下:
 




原文地址:https://www.cnblogs.com/topshooter/p/5687862.html