PyQt5 – Different border corner of Label
In this article, we will see how to make different types of curves for different corners. We can make borders to a label using
setStyleSheet() method but default borders have right angles at the corners i.e not having any curves, but also we can use makes curves by setting
border-radius. This will make same curve at all the four corner.
Below is the example of normal border vs different curves at different corners :
This can be done using
Syntax :label.setStyleSheet("border :3px solid blue;" "border-top-left-radius :35px;" "border-top-right-radius : 20px; " "border-bottom-left-radius : 50px; " "border-bottom-right-radius : 10px")
Argument : It takes string as argument.
Action performed : Changes the curve at each corner.