Results 1 to 7 of 7

Thread: setStyleSheet doesnt work on raspberry pi

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2019
    Posts
    6
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default setStyleSheet doesnt work on raspberry pi

    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
    Last edited by mrtyvz41; 25th July 2019 at 13:58.

Similar Threads

  1. phonon not work on raspberry
    By iskenderoguz in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 1st March 2015, 16:00
  2. Shortcut doesnt work
    By tuli in forum Qt Programming
    Replies: 0
    Last Post: 18th September 2012, 15:01
  3. Qwt Tex Text Doesnt work for me
    By gbmtoday in forum Qwt
    Replies: 1
    Last Post: 21st November 2010, 19:48
  4. connect doesnt work
    By john_god in forum Newbie
    Replies: 4
    Last Post: 23rd November 2008, 09:36
  5. How come this doesnt work?
    By ShaChris23 in forum Newbie
    Replies: 8
    Last Post: 16th June 2007, 04:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.