I currently have a program which changes the color of the background of the QLCDumber widget when a certain value is displayed on the lcd number, is it possible for instead of a color being the background when a certain value is reached an image appears in the background, such as a smiley face?
Here is the relevant snippet of my code responsible for the change in color.
def OnValueFound(self, value):
self.ui.lcdNumber.display(value)
if 100 < value < 300:
self.ui.lcdNumber.setStyleSheet("""QLCDNumber {background-color: green; color: black;}""")
else:
self.ui.lcdNumber.setStyleSheet("""QLCDNumber {background-color:red; color: black;}""")
so instead of say the background color changing to another color it changes to an image?
I hope this makes sense.
I do not know if I understood you correctly. Try it
border-image: url(E:/_Qt/img/heart.png);