PyQt5 QCalendarWidget – Device Pixel Ratio
In this article we will see how we can get device pixel ratio of the QCalendarWidget. The device pixel ratio is the ratio between physical pixels and logical pixels of the calendar. Common values are 1 for normal-dpi displays and 2 for high-dpi “retina” displays.
In order to do this we will use
devicePixelRatiomethod with the QCalendarWidget object.
Syntax : calendar.devicePixelRatio()
Argument : It takes no argument
Return : It return integer
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