PyQt5 QSpinBox – Setting Attribute
In this article we will see how we can set the attribute to the spin box, attributes are basically the qualities of the spin box, some attributes are similar to the spin box flags. There are many attributes available for the spin box like WA_AcceptDrops, WA_AlwaysShowToolTips etc.
In order to do this we use
setAttribute method with the spin box object.
Syntax : spin_box.setAttribute(Qt.WA_Disabled)
Argument : It takes QWidget Attribute object 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