PyQt5 QSpinBox – Finding child through position
In this article we will see how we can get the child of the spin box at the given position inside the spin box, child are basically the component of the spin box, for example, the spin box main child is its QLineEdit which is used to see the value and set the value.
In order to do this we use
Syntax : spin_box.childAt(x, y)
Argument : It takes position as argument it can be x, y co-ordinates or the QPoint object
Return : It returns child at given position if there is no child it return None
Note : The co-ordinates are not of the window co-ordinate system they are in spin box co-ordinate system
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