While using PyQt5, there occur a need of removing or clearing labels in order to do so
clear() method is used. This method belongs to the QLabel class, and can be used on only label widgets.
Syntax : label.clear()
Argument : It takes no argument.
Action Performed : It clears(remove) the label from main window.
Below is the implementation of this method.
As on the above image we can see Label2 will not be seen because of
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