Python PYQT QLineEdit字体颜色

时间:2015-09-02 18:19:13

标签: python pyqt

如何更改QLineEdit中的字体颜色?

self.texteditor1= QtGui.QLineEdit(self)
font = self.texteditor1.font()     
font.setPointSize(10)              
self.texteditor1.setFont(font) 
self.texteditor1.setFixedWidth(640)
self.texteditor1.setFixedHeight(30)
self.texteditor1.adjustSize()
self.texteditor1.move(20,120)

0 个答案:

没有答案