We know we can set geometry of button using
setGeometry method, geometry in PyQt5 refer to the location and size of the push button.
In order to get the geometry of any push button we will use
geometry method. This method will return the
QRect object which tells the location and the size of push button also it is the argument of
Syntax : button.geometry()
Argument : It takes no argument.
Return It returns QRect object.
PyQt5.QtCore.QRect(200, 150, 100, 40)
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