In this article we will see how to add or change the caption associated with the check box. In check box there are basically two parts one it the check part which consist of the checked symbol and other is the text part which is similar to the label it contain text.
In order to add or change the text of check box we will use
Syntax : checkbox.setText(caption)
Argument : It takes string as argument.
Action performed : It will replace the existing caption with new one
Below is the implementation.
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.
- PyQt5 - Retrieving caption of Check Box
- PyQt5 - Check box checked state depending upon another check box
- PyQt5 - Program to get caption of Radio Button
- PyQt5 QSpinBox – Setting caption to it
- PyQt5 QSpinBox – Accessing caption
- PyQt5 - How to hide the items from drop down box in Combo Box
- PyQt5 - Selecting any one check box among group of check boxes
- Avengers Endgame and Deep learning | Image Caption Generation using the Avengers EndGames Characters
- Image Caption Generator using Deep Learning on Flickr8K dataset
- PYGLET – Setting Window Caption
- PYGLET – Getting Window Caption
- Working with Input box/Test Box in Selenium with Python
- PyQt5 - Check Box with Indicator at right side
- PyQt5 - isChecked() method for Check Box
- PyQt5 - Tri-state Check Box
- PyQt5 - isTristate() method for Check Box
- PyQt5 - setChecked() method for Check Box
- PyQt5 - isRightToLeft() method for Check Box
- PyQt5 - isLeftToRight() method for Check Box
- PyQt5 - Bordered Check Box
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.