I want to change the background color and numbers QLCDNumberin Qt Designer, and I'm going to use this project (GUI) in my Python program.
Some people said they could get my add stylesheet in Qt-Designer.
QLCDNumber{color:rgb(85, 85, 255);background-color:rgb(0, 170, 255);}
Successfully for the background color is not for the color of the numbers.
How can I get the color of the numbers
thank
I cannot use the last two setColor (for a light border and a dark border). I generated python code (for GUI) from Qt4 Designer using the pyuic4 tool. I added the codes to my python code file (ending in .py not.ui) as follows
self.palette = self.withpalette.palette()
self.palette.setColor(QtGui.Palette.WindowText,QtGui.QColor(85,85,255))
self.palette.setColor(QtGui.Palette.Background,QtGui.QColor(0,170,255))
self.palette.setColor(QtGui.Palette.Light,QtGui.QColor(255,0,0))
self.palette.setColor(QtGui.Palette.Dark,QtGui.QColor(0,255,0))
self.withpalette.setPalette(self.palette)
source
share