In this article, we will see how we can hide the Label in the PyQt5 application. A label is a graphical control element which displays text on a form. It is usually a static control; having no interactivity. A label is generally used to identify a nearby text box or other widget.
In order to hide the label we use
setHidden() method, this method allows user to set if the widget should be visible or hidden, it belongs to the
Syntax : label.setHidden(True)
Argument : It takes bool as an argument.
As we can see the label 2 is hidden in the output window.
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