In this article we will see how we can make spin box enabled according to the user, disabled spin box is basically spin box which can’t be edited i.e which get disabled and enabled spin box is normal spin box, by default spin box is enabled. In order to make spin box disabled we use
In order to do so we use
Syntax : spin_box.setEnabled(bool)
Argument : It takes bool as argument
Return : It returns None
Implementation steps :
1. Create a spin box
2. Create a push button and add action to the push button
3. Inside the action make the spin box disabled
4. Create another push button and add action to it
5. Inside the action make the spin box enabled
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.