How can I change the color and font of QLineEdit?
Here is my code:
self.lineEdit = QtGui.QLineEdit(widget)
self.lineEdit.setText("enter keywords here") #I want this to be in italics and in brown color
The setText
line from Documentation says the text inside is of QString how can I change it's font and color?
For the Color use
QPallete
, then use{your palette}.setColor(QtGui.QPalette.Text, {your QColor})
, and the font useQFont
My Solution: