Home > Software design >  How do I change the color of a PushButton when another button is pressed(PyQT5, QT)
How do I change the color of a PushButton when another button is pressed(PyQT5, QT)

Time:06-09

Hello for my application, I am trying to change the color of one button when different button is pressed.

I am doing this by creating a global boolean variable called changeSymbol, and one of the buttons will change when the changeSymbol returns true.

Here is my code: [EDIT Due to difficulties in copy and pasting (also I am new to stack overflow) I will post screenshots instead] enter image description here enter image description here enter image description here

enter image description here

CodePudding user response:

I don't know if I understand problem because I can't see full code.

Maybe you should do all in one function

def Change_pressed(self):
    if self.Change.isChecked():
        self.Change.setText("           
  • Related