0

I have been trying to change the background-color of my pyqt QLineEdit widget using the setStyleSheet function part of the QWidget class but the background-color remains white no matter what I set it to, yet I am still able to change the color of the text within the QLineEdit. It seems like only the background-color attribute is having issues. I am running this on MacOS 10.14 Mojave using pyqt5

Heres the stylesheet code from within my App class which inherits from QTabWidget:

self.setStyleSheet("""
    QTabWidget {background-color: rgb(40,40,39)} 
    QLineEdit {background-color: rgb(107,107,107); color: blue}
    QPushButton {background-color: rgb(53,53,52); color: 
    rgb(200,200,200)} 
    """)

Where I end up with:

enter image description here

Does anyone know if it is an issue with MacOS?

Thanks

eyllanesc
  • 235,170
  • 19
  • 170
  • 241

0 Answers0