I am trying to create a demonstration app to show how to change font colors.
I can do it in QLabel and QTextEdit
I have found no way to change the foreground
You can do it by setting the object's style sheet:
self.my_line_edit = QtGui.QLineEdit() self.my_line_edit.setStyleSheet("color: red;") # or self.my_line_edit.setStyleSheet("color: rgb(255, 0, 0);") # or self.my_line_edit.setStyleSheet(""" QLabel { color: red; } """)