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
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