[Development] Bringing Qt's high-dpi support to more platforms

Daiwei Li daiweili at gmail.com
Tue May 27 11:47:15 CEST 2014


Hi Morten,

My understanding of your platform independent change was that it would let
the scale factor be set by the user at runtime with an environment
variable. Is it meant to replace all platform plugin scaling (I.e. iOS and
OSX) or augment it?

It seems to me that Android could indeed leverage the platform independent
scaling code by setting QT_HIGHDPI_SCALE_FACTOR. However, it would mean
different things on Android and iOS (relative to physical resolution and
relative to scaled resolution) and if the Android plugin relied on the env
variable and iOS kept its platform plugin scaling. Is being able to use
QT_HIGHDPI_SCALE_FACTOR to scale relative to the scaled resolution a
supported use case?

I suppose another consideration would be setting the scale based on the
monitor you're on. I don't know how developed Android's multi monitor
support is, but if you wanted your application to change scale when it
moved across different density displays, I imagine the platform plugin
would need to do some work.

Daiwei
On May 27, 2014 1:25 AM, "Sorvig Morten" <Morten.Sorvig at digia.com> wrote:

>
> On 26 May 2014, at 22:40, Daiwei Li <daiweili at gmail.com> wrote:
>
> > I took a stab at adding high DPI support to Android and created a review
> here: https://codereview.qt-project.org/#change,86260. I would appreciate
> any feedback (e.g. what tests need to be added, what other corner cases
> need to scaled, etc...), especially seeing as I'm not an Android or Qt
> HiDPI expert :).
>
> This is how it works according to my understanding as well. Android has
>  device-independent pixels on the XML side only (“512dp”). The Java API
> takes device pixels and needs scaling.
>
> The question is: We’re going to have scaling in QtGui with change
> https://codereview.qt-project.org/#change,86107. Do we want to duplicate
> it in the Android platform plugin?
>
> Morten
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140527/28d29a87/attachment.html>


More information about the Development mailing list