python QLineEdit Text Color

后端 未结 4 498
野性不改
野性不改 2021-01-04 09:17

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

4条回答
  •  一生所求
    2021-01-04 09:51

    I solved for font text and background

     self.my_line_edit.setStyleSheet(
                    """QLineEdit { background-color: green; color: white }""")
    

提交回复
热议问题