In this article, we will see how we can easily clear/erase the content of the label of PyQt5 application. This can be done in two ways –
clear()method, this will clear the content of the label.
setText()method with passing a blank string, this will update the content with blank string.
clear() method –
Syntax : label.clear()
Argument : It takes no argument.
setText() method –
Syntax : label.setText(“”)
Argument : It takes string as argument, here string will be blank.
- PyQt5 – How to change text of pre-existing label | setText method
- PyQt5 – How to hide label | label.setHidden method
- PyQt5 – How to change size of the Label | label.resize method
- PyQt5 Scrollable Label - Setting tool tip to the label part
- PyQt5 Scrollable Label - Getting tool tip text of the label part
- PyQt5 Scrollable Label – Setting tool tip duration to label part
- PyQt5 Scrollable Label – Getting tool tip duration of the label part
- PyQt5 Label – Checking if label is window type
- PyQt5 Label – Checking if label is widget type
- PyQt5 - How to access content of label ?
- PyQt5 – What's this help text for Label | setWhatsThis() method
- PyQt5 – How to set tooltip duration for Label | setToolTipDuration method
- PyQt5 – Access tool tip duration of label | ToolTipDuration method
- PyQt5 – Get tooltip data of label | toolTip() method
- PyQt5 - alignment() method for Label
- Setting and accessing name of a Label - PyQt5
- PyQt5 – How to change font and size of Label text ?
- PyQt5 – Setting and accessing name of a Label
- PyQt5 QSpinbox - Dragging text from it and dropping it to Custom Label
- PyQt5 - Access the size of the Label
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.