pyqt5控件

背景色设置
self.tab.setStyleSheet("background: rgb(238, 233, 233)")
self.but_0.setStyleSheet("background: rgb(0, 255, 255)")
样式:
self.but_0.setStyle(QStyleFactory.create("Windows"))
字体:
self.lineEdit.setFont(QFont("timers", 12, QFont.Bold))
self.lineEdit.setStyleSheet("color:red")

猜你喜欢

转载自www.cnblogs.com/xaiobong/p/10142585.html