[Interest] Physical Display Size on Android

Rutledge Shawn Shawn.Rutledge at digia.com
Tue Sep 17 13:01:15 CEST 2013


On 17 Sep 2013, at 10:05 AM, noname wrote:

> Hi everyone,
> 
> using Qt 5.1.1, is there a more accurate way to determine the physical 
> display size or the DPI of a mobile android device, than using 
> QScreen::physicalSize or QScreen::physicalDotsPerInch(X/Y)? Those values 
> aren't correct on most of our testing devices.
> Example: One device has a ~218dpi display, but 
> QScreen::physicalDotsPerInch (also QScreen::physicalDotsPerInchX and 
> QScreen::physicalDotsPerInchY) returns ~160dpi. 
> QScreen::logicalDotsPerInch returns 150.
> Then again, on some devices the correct values are reported and 
> everything works as it should.

IMO that sounds like a bug; logical can be different than physical, but physical resolution should be correct.  Please file a bug at bugreports.qt-project.org and give details about which devices have it correct and which don't, which SDK and NDK and API versions you are using, etc.




More information about the Interest mailing list