[Development] Proposal: expose the OS/platform in QML

Bache-Wiig Jens Jens.Bache-Wiig at digia.com
Wed Jan 16 09:22:39 CET 2013


>> 
>> Second, it would be useful to know if I am on a "phone", "tablet" or "desktop" platform. ( can already guess by the resolution but perhaps it would be convenient to abstract it a bit.
> 
> These days you can't really tell from the resolution :) But I don't 
> think Qt currently has a way to distinguish xcb/wayland running on a 
> tablet vs a desktop, or eglfs running on a phone vs a tablet. How would 
> a typical Android application make the latter distinction?

Yes, and that was exactly my point. We need an abstract way for a platform to tell us if it is one of those formFactors without us guessing or knowing exactly which device type it is. I would probably rename "phone" to "handheld" as and iPod Touch is obviously the same form factor as well.

jens


More information about the Development mailing list