In this article we will see how we can get the horizontal resolution of the device in dots per inch(DPI) of the spin box. Logical dots per inch are used to convert font and user interface elements from point sizes to pixel sizes, and might be different from the physical dots per inch.
Note : If the horizontal logical DPI doesn’t equal to the physical horizontal DPI then the corresponding QPaintEngine must handle the resolution mapping.
In order to do this we use
logicalDpiX method with the spin box object.
Syntax : spin_box.logicalDpiX()
Argument : It takes no argument
Return : It returns 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