In this article we will see how we can set date text format to the specific date in the QCalendarWidget. Setting date text format makes the specified date looks more special such as increasing the size and other features. Below is how date with date text format looks like.
In order to do this we will use
setDateTextFormatmethod with the QCalendarWidget object.
Syntax : calendar.setDateTextFormat(date, format)
Argument : It takes two argument first is QDate object and second is QTextCharFormat object
Return : It return None
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