PyQt5 QCalendarWidget – Getting Direction Property
In this article we will see how we can get the direction of the QCalendarWidget. There are three type of direction available in the calendar, first is the default one which is left to right, second is right-to-left layouts which are necessary for certain languages, notably Arabic and Hebrew. Third is LayoutDirectionAuto serves two purposes. When used in conjunction with other objects, it will imply to use the layout direction set on the parent widget or QApplication.
In order to do this we will use
layoutDirectionmethod with the QCalendarWidget object.
Syntax : calendar.layoutDirection()
Argument : It takes no argument
Return : It return direction object but when printed it shows the associated value with them
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