In this article we will see how we can get the font information of the QCalendarWidget. A font is a particular size, weight and style of a typeface. Each font was a matched set of type, one piece for each glyph. By changing font we can change the style of the text present in the calendar. We can change/set font using
setFont method. Font information tell the qualities of the font like if it is bold or not, italic or not, pixel size and many other information.
In order to do this we will use
fontInfomethod with the QCalendarWidget object.
Syntax : calendar.fontInfo()
Argument : It takes no argument
Return : It return QFontInfo 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.