When we make a form and there are multiple check boxes. We can select some of them or only one of them as they are contradictory to each other. So the GUI (Graphical User Interface) stops us to selecting more than one check box, if we select more than one check box it makes other boxes unchecked.
In this article we will see how to make a group of check boxes such that we can select any one of them. If we try to select the other check box it will automatically make other check boxes uncheck.
In order to do this we have to do the following –
1. Create a group of check box.
2. For each check box connect a method such that every time state of check box get changed that method should get called.
3. That method should check if the state is checked, if the state is unchecked do nothing.
4. If the state is checked, check by which check box this method is called.
5. Make all other check boxes to unchecked.
Below is the implementation.
- PyQt5 - Check box checked state depending upon another check box
- PyQt5 - How to hide the items from drop down box in Combo Box
- PyQt5 QSpinBox - Connecting two spin boxes with each other
- PyQt5 QSpinBox – Selecting all the text
- PyQt5 QDateEdit - Selecting Whole Date
- PyQt5 QDateTimeEdit – Selecting both Date and Time text
- PyQt5 QDoubleSpinBox – Selecting only Value
- Working with Input box/Test Box in Selenium with Python
- Message Boxes using PyAutoGUI
- Mahotas - Getting Bounding Boxes of Labelled Image
- Selecting rows in pandas DataFrame based on conditions
- Indexing and Selecting Data with Pandas
- PYGLET – Selecting Paragraph in Caret
- PYGLET – Selecting Point in Caret
- PYGLET – Selecting Word in Caret
- Selecting a drop-down list by using the Selenium.select_by_visible_text() method in 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
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.