In this article we will see how we can get the current geometry of the spin box. Geometry is basically the position as well as the size of the spin box. Setting geometry to the spin box can change its size as well as its postion. We use
setGeometry method to set or change the geometry of the spin box.
In order to do this we use
geometry method with the spin box object.
Syntax : font_metrics.geometry()
Argument : It takes no argument
Return : It returns QRect object
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.
- PyQt5 QSpinBox - Getting the frame geometry
- PyQt5 QSpinBox - Getting normal geometry
- PyQt5 QSpinBox - Getting current value
- PyQt5 QSpinBox - Setting/Changing Geometry
- PyQt5 QSpinBox - How to save its geometry
- PyQt5 QSpinBox - How to restore geometry
- PyQt5 QDockWidget – Getting Frame Geometry
- PyQt5 - Getting the current index of selected item in ComboBox
- PyQt5 QCalendarWidget - Getting Current Month
- PyQt5 QCalendarWidget - Getting Current Year
- PyQt5 QColorDialog - Getting Current Color
- PyQt5 QDateTimeEdit – Getting Current Section Index
- PyQt5 QDateTimeEdit – Getting Current Section
- PyQt5 QDoubleSpinBox - Getting Current Value
- PyQt5 QListWidget - Getting Current Selected Row
- PyQt5 QListWidget - Getting Current Item
- PyQt5 QSpinBox - Getting depth
- PyQt5 QSpinBox - Getting Pixel ratio
- PyQt5 QSpinBox - Getting System Identifier
- PyQt5 QSpinBox – Getting whole text
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.