I'm just evaluating mobile development with Qt 5.6Beta,
qt.labs.controls, Android, Material
and have set Qt::AA_EnableHighDpiScaling

now it would be cool to "think" in cm or mm

for my device (BlackBerry PRIV, Android 5.1.1)
with 544 ppi, where devicePixelRatio (scaling factor) is 3.5

would be more intuitive to define
Rectangle {
    width: 1 cm
    height: 0.6 cm
}
compared with
Rectangle {
    width: 64
    height: 40
}
and then to calculate:
64 * 3.5 = 224 / 544 ppi = 0.41 in = 1.04 cm

BTW: HighDpiScaling works great.
added images (to compare sizes with Rectangles):
test.png (64x40)
t...@2x.png (128x80)
t...@3x.png (192x120)
t...@4x.png (256x160)

devicePixelRatio of 3.5 was exactly in the middle between @3x and @4x
Qt uses the next larger one: t...@4x.png and scaled it down to 3.5
tested this also with a much larger image - all is well done.
great work !

-- 

ekke (ekkehard gentz)

independent software architect
international development native mobile business apps
BlackBerry 10 | Qt Mobile (Android, iOS)
workshops - trainings - bootcamps

*BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner*

max-josefs-platz 30, D-83022 rosenheim, germany
mailto:e...@ekkes-corner.org
blog: http://ekkes-corner.org
apps and more: http://appbus.org

twitter: @ekkescorner
skype: ekkes-corner
LinkedIn: http://linkedin.com/in/ekkehard/
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to