Qt 6.11 is out! See what's new in the release
blog
How to make a curved QPushButton in PyQt5?
-
This post is deleted!
-
This post is deleted!
Hi @niklaspeter123 ,
You can use Style Sheet to customize border-radius property (radius of the button's corners):
# setting geometry of button button.setGeometry(200, 150, 100, 100) # setting radius and border - Circular button button.setStyleSheet("border-radius : 50; border : 2px solid black") # setting radius and border - Curved corners button.setStyleSheet("border-radius : 50; border : 2px solid black") -
If it is possible only the outer edge of the circle should be pressable.
-
If it is possible only the outer edge of the circle should be pressable.
@niklaspeter123
I imagine for that you'll have to write code to do a hit-test of where the mouse is when the button is pressed. -
@niklaspeter123
I imagine for that you'll have to write code to do a hit-test of where the mouse is when the button is pressed.@JonB Is there no other method?