PyQt5 QLabel – Adding blur effect
In this article we will see how we can add blur effect to the label, blur means smoothing of the label, by default there is no blur effect to the label although we can add blur effect any time. Below is the representation of label with blur effect.
In order to do this we have to do the following –
1. Create a label
2. Create QGraphicsBlurEffect object
3. Add this object to the label with the help of setGraphicsEffect method
# creating a blur effect self.blur_effect = QGraphicsBlurEffect() # adding blur effect to the label label.setGraphicsEffect(self.blur_effect)
Below is the implementation