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.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course