In this article we will see how we can change the value of spin box using
setBy method, we can step up the value of spin box with the help of arrow button as well but in order to change the value we use
setBy method, this method add the passed value to the current value.
In order to do so we use
Syntax : spin_box.setBy(n)
Argument : It takes integer as argument
Action performed : It change the value of spin box
Implementation steps :
1. Create a spin box
2. Create a push button
3. Add action to the push button
4. Inside the action call the stepBy method
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