0

I am building a keypad lock system using PyQt5 and am trying to make it so after the first button is clicked, the circle underneath "enter passcode" becomes full. After the second button is clicked, the second circle becomes full, ect...

here is the button code:

global pin1
pin1 = QPushButton("1", self) 
pin1.setFont(QFont('Lucida Grande', 25)) 
pin1.setGeometry(60, 130, 60, 60) 
pin1.setStyleSheet("border-radius : 15; border : 1px solid white; background-color : #3A3535; color : white") 
pin1.clicked.connect(self.one)

and that is linked to this:

def one(self):
    text = self.label.text() 
    self.label.setText(text + "1")

this is the code for the circle below:

global cirle1
cirle1 = QLabel(self) 
cirle1.setGeometry(142, 95, 6, 6)
cirle1.setStyleSheet("border-radius : 3; border : 1px solid white")

Here is a picture of the screen

enter image description here

Eden
  • 31
  • 1
  • 10

1 Answers1

0

The color you set in setStyleSheet sets the border color.

Try using background-color.

may be something like this

cirle1.setStyleSheet("background-color: red;border-radius : 3; border : 1px solid white")
Pavan Chandaka
  • 11,671
  • 5
  • 26
  • 34