Hi to everyone,
i developing simple screen desing but i have a problem. I write on my desktop that base linux ubuntu 16.04 and pycharm editor, when i execute code everything awesome. But i try to run on raspberry pi same code, button.setStyleSheet("background-color: red") doesnt work. Moreover i dont get any eror,it comes screen but when i clicked to button, dont change button background color.
i want to change button background color when i clicked to button. This code running on my desktop.
def initUI(self):
self.btn.setToolTip('Buton1 islemleri') # Buton aciklamasini gosteriyor,uzerine gelindiginde.
self.btn.resize(120,70) # BOYUTLANDIRMA
self.btn.move(50, 50) # KONUMLANDIRMA
self.btn.clicked.connect(self.buton1_event) # button1 cikis olayi
def Ac(self,Cpin):
GPIO.output(Cpin,GPIO.HIGH)
def Kapat(self,Cpin):
GPIO.output(Cpin,GPIO.LOW)
# --------------Button1 Tiklama Olayi ------------------
def buton1_event(self):
if self.lcd1Bool == True:
self.lcd1.display(1)
self.Ac(kapaliCikis)
self.btn.setStyleSheet("background-color: yellow") # this line doesnt work !!!
self.lcd1Bool = False
else:
self.lcd1.display(0)
self.Kapat(kapaliCikis)
self.btn.setStyleSheet("background-color: #257c07") # this line doesnt work !!!
self.lcd1Bool = True
Bookmarks