[Interest] DPI

igor.mironchik at gmail.com igor.mironchik at gmail.com
Sun Feb 23 16:35:22 CET 2014

QScreen::physicalDotsPerInch returns the same value as 

But why do you think that QScreen::physicalDotsPerInch more reliable?

P.S. I did not look at the Qt code yet, but I guess that I have to do it...

-----Original Message----- 
From: Allan Sandfeld Jensen
Sent: Sunday, February 23, 2014 4:10 PM
To: interest at qt-project.org
Cc: igor.mironchik at gmail.com ; Andre Somers
Subject: Re: [Interest] DPI

On Sunday 23 February 2014, igor.mironchik at gmail.com wrote:
> I’m absolutely sure that Qt determines DPI wrong.
> I’ve received from Qt that my screen has 72 DpiY, where actually it has
> 130.
> So my question is what can I use else then 
> QDesktopIWidget::physicalDpiY()?
I find QScreen::physicalDotsPerInch to be more reliable, but if the platform
plugin you are using does not provide the information, then Qt will not have
it. Though you can may be able to calculate it if you know the physical 

> I need cross-platform solution of finding average finger size (it’s
> somewhere 10 mm)...
So 1cm? One inch is 2.54cm, so divide device DPI with 2.54

Best regards

More information about the Interest mailing list