In this article we will see about how to set icon to a check box. Setting icon to a check box is similar to setting icon to a main window, icon of check box appear in between the indicator and the check box it self below is how normal check box vs check box with icon looks like.
In order to do this we will use
Syntax : checkbox.setIcon(QIcon(‘icon.png’))
Argument : It takes file name or path as argument.
Action performed : It will set icon to the check box
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.