In this article we will see how to set the radio button to checked state. Radio button has two states by default checked and unchecked, in checked state indicator is filled whereas in unchecked state indicator is empty.
In order to check the program we will use
Syntax : radio_button.setChecked(True)
Argument : It takes bool as argument.
Action performed : It will make the radio button checked.
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 – Check if alignment of radio button is left to right
- PyQt5 – Check if layout direction of radio button is right to left
- PyQt5 - Program to get caption of Radio Button
- PyQt5 – Radio button indicator at right side
- PyQt5 – Change text in Radio Button on click
- PyQt5 - Dotted border of Radio Button
- PyQt5 - How to stop radio button from getting checked
- PyQt5 - Dotted border indicator in Radio button
- PyQt5 - Change state of Radio Button
- PyQt5 - Find if Radio Button is checked
- PyQt5 - Adding action to Radio Button
- PyQt5 - Background image to Radio Button
- PyQt5 - Background image to indicator of Radio Button
- PyQt5 - How to add icon to Radio Button ?
- PyQt5 - Setting color to indicator of Radio Button
- PyQt5 - Background color to Radio Button
- PyQt5 - How to make capsule shaped Radio button ?
- PyQt5 - Rectangular indicator Radio Button
- PyQt5 - Capsule shaped indicator of Radio button
- PyQt5 - Tube shaped indicator of Radio Button
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.