[Interest] DPI

Allan Sandfeld Jensen kde at carewolf.com
Sun Feb 23 15:10:57 CET 2014


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 screen 
size.

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



More information about the Interest mailing list