In this article we will see how we can get the date alignment of the QDateEdit. By default, the text is aligned on the left hand side although by changing the alignment we can make the date appear in the center with the help of
setAlignment method. Changing alignment does not effect the functionality of the date edit.
In order to do this we use
alignment method with the QDateEdit object
Syntax : date.alignment()
Argument : It takes no argument
Return : It returns Alignment flag 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. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course