[Interest] Physical Display Size on Android

noname freekee1 at gmx.de
Tue Sep 17 10:05:57 CEST 2013


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.

Is there another way to determine those values, or maybe an automated 
calibration process applicable here? We need to scale certain UI 
elements to predefined physical sizes, which is hard if the values we 
use are incorrect.


Thanks in advance for any advice and kind regards.



More information about the Interest mailing list