In this article we will see how we can get the alignment of the spin box, by default the spin box text is left aligned although we can change it, there are many alignment available for spin box.
In order to get the alignment flag of the spin box we use alignment method.
Syntax : spin_box.alignment()
Argument : It takes no argument
Return : It returns Qt.Alignment object i.e alignment flag.
Note : Return object by this method can be used to set other alignment as well.
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 - Setting alignment
- PyQt5 QDateEdit - Getting Date Alignment
- PyQt5 QListWidget – Getting Item Alignment
- PyQt5 QListWidget – Getting all Scroll Bar at given alignment
- Qt Alignment in PyQt5
- PyQt5 - alignment() method for Label
- PyQt5 – Check if alignment of radio button is left to right
- PyQt5 QDateEdit - Setting Date Alignment
- PyQt5 QListWidget – Setting Item Alignment
- PyQt5 QSpinBox - Getting depth
- PyQt5 QSpinBox - Getting Pixel ratio
- PyQt5 QSpinBox - Getting System Identifier
- PyQt5 QSpinBox - Getting current value
- PyQt5 QSpinBox – Getting whole text
- PyQt5 QSpinBox - Getting accessible name
- PyQt5 QSpinBox - Getting list of children
- PyQt5 QSpinBox - Getting background role
- PyQt5 QSpinBox - Getting base size
- PyQt5 QSpinBox - Getting Children Rectangle
- PyQt5 QSpinBox - Getting Children Region
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.