PytQt5 – Adding action to Check Box
In this article we will see how to set an action to a check box. Adding action to a check box means when the check box is checked it should perform some task. In order to do so we will use
stateChanged.connect method, when the state of the checkbox is changed it will connect it to the action.
Syntax : checkbox.stateChanged.connect(method_name)
Argument : It takes method name as argument.
Action performed : It will call the method when check box will be checked
Below is the implementation.
When checkbox will be checked window will look like this
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