PyQt5 QSpinBox – Finding child using child type
In this article we will see how we can find the child of spin box using the child type, child type is the quality of child for example push button type is QPushButton. Spin box is made of two child one is line edit whose type is QLineEdit and other is those up and down button whose type are QValidator.
In order to do this we use findChild method
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
Syntax : spin_box.findChild(child_type)
Argument : It takes child type as argument
Return : It returns the child object, if no child is found it return None
Below is the implementation