[Development] Scalable UIs in QtQuick (take 2)

Curtis Mitch mitch.curtis at theqtcompany.com
Thu Feb 18 12:59:50 CET 2016


> -----Original Message-----
> From: Development [mailto:development-
> bounces+mitch.curtis=theqtcompany.com at qt-project.org] On Behalf Of Nikita
> Krupenko
> Sent: Thursday, 18 February 2016 12:36 PM
> To: development at qt-project.org
> Subject: Re: [Development] Scalable UIs in QtQuick (take 2)
> 
> 2016-02-18 12:50 GMT+02:00 Hausmann Simon
> <Simon.Hausmann at theqtcompany.com>:
> > (1) In order to make it really easy to scale "logical" pixels without
> having to introduce your own context property or factor in a .qml file
> that you multiply everywhere, we could turn the regular "pixels" in
> QtQuick into truly logical pixels that scale with an application wide (or
> window wide) factor. So Image { width: 100 ... } will scale automatically
> from 100 logical pixels to maybe 200 physical pixels on a x2 display. This
> assumes the availability of API to change this mapping.
> >
> > (2) In the events where you still _want_ to use physical pixels, you
> could use "px" units.
> >
> > So at first nothing would change for app developers at all because we
> > map logical pixels to physical pixels. But if you'd like to, you could
> opt into changing this mapping and having a relatively easy fallback to
> physical pixels using for example the "px" unit. We might as well offer
> the other physical units anyway, that probably causes little to no harm.
> 
> Isn't (1) already done with Qt::AA_EnableHighDpiScaling?
> [snip]

This was exactly my thought. I wonder if this functionality is still needed now that we have the high DPI support.

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



More information about the Development mailing list