PyQt5 QCalendarWidget – Getting Content Rectangle
In this article we will see how we can get the content rectangle to the QCalendarWidget. Content rectangle is the bounding rectangle of the content, by default content margin value is zero, so content rectangle is equal to the actual bounding rectangle but when margin change it become smaller as content rectangle is the rectangle excluding the margins. We can add margin with the help of
In order to do this we will use
contentsRectmethod with the QCalendarWidget object.
Syntax : calendar.contentsRect()
Argument : It takes no argument
Return : It return QRect 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