PyQt5 – checkState() method for Check Box
There are basically two states in check box that are checked or unchecked, although using
setTristate method we can add an intermediate state.
checkState method is used to check the state of the check box, it returns CheckState object but when we print it output will be as follows:
- 0 for un-checked state
- 2 for checked state
- 1 for intermediate state
Syntax : checkbox.checkState()
Argument : It takes no argument.
Return : It returns CheckState object
Below is the implementation.
Before check status : 0 After check status : 2
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