Unlike setting background images, skins adjust themselves according to the size of Label. In background image, if the image size is large and label size is small only that part of image is displayable that comprises the size of label. Below is the difference between background image and skin of label.
For this image :
Background image of label and skin of label will look like this :
In order to do this we will use
Syntax : label.setStyleSheet(“border-image : url(image.png);”)
Argument : It takes string as argument.
Action performed : It sets the image as skin of label
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