PyQt5 QCalendarWidget – Grabbing Rectangle
In this article we will see how we can grab the rectangle from the QCalendarWidget. Grabbing rectangle means to renders the calendar into a pixmap restricted by the given rectangle. If the calendar has any children, then they are also painted in the appropriate positions.
In order to do this we will use
grabmethod with the QCalendarWidget object.
Syntax : calendar.grab(rectangle)
Argument : It takes QRect object as argument
Return : It return QPixmap object
Below is the implementation