In this article we will see how we can make spin box disabled according to the user, disabled spin box box is basically spin box which can’t be edited i.e which get disabled. Below is the representation of how disabled spin box looks like.
In order to do so we use
Syntax : spin_box.setDisabled(bool)
Argument : It takes bool as argument
Return : It returns None
Implementation steps :
1. Create a spin box
2. Create a push button
3. Add action to the push button
4. Inside the action make the spin box disabled
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