PyQt5 QSpinBox – How to get the X and Y co-ordinates respectively
In this article we will see how we can get the X and Y co-ordinates of the spin box. X co-ordinate is the distance of spin box from the left side of window frame and Y co-ordinate is the distance of spin box fro the upper side of the window frame, using X and Y co-ordinate we can determine the position of the spin box in the window.
In order to do this we use
y method respectively with the spin box object.
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.x() and spin_box.y()
Argument : It takes no argument
Return : It returns integer
Below is the implementation