In this article we will see how we can disable the color effect of the label according to the user instruction such that when user check the radio button color effect should disappear and when user uncheck the radio button it should appear again.
In order to do this we have to do the following :
1. Create a label
2. Create a color effect object and set it to the label
3. Create a radio button
4. Add action to the radio button
5. Inside the action check if radio button is checked, it checked make color effect disable
6. Else make color effect enable
In order to make the color effect disable and enable we use
Syntax : color_effect.setEnabled(False)
Argument : It takes bool as argument
Return : It returns none
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. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course