[Development] Mismatch of display resolutions and window sizes in Android applications
Denis Shienkov
denis.shienkov at gmail.com
Mon Jan 15 15:35:51 CET 2018
Hi,
> This is by design for Qt::AA_EnableHighDpiScaling: you get the logical
window size.
Yes, seems it is. I did not know that. Now, I do not use
Qt::AA_EnableHighDpiScaling
at all, because I need to operate with a real resolutions.
Many thanks, anyway. :)
2018-01-15 17:12 GMT+03:00 Morten Sørvig <Morten.Sorvig at qt.io>:
> This is by design for Qt::AA_EnableHighDpiScaling: you get the logical
> window size. The
> physical size can be computed by multiplying with QQuickWindow::
> effectiveDevicePixelRatio().
>
> For QtLocation it looks like you have to enable high-dpi tiles by setting
> “osm.mapping.highdpi_tiles"
> (or a similar option, depending on which tile provider you are using).
>
> Morten
>
>
> > On 13 Jan 2018, at 19:27, Denis Shienkov <denis.shienkov at gmail.com>
> wrote:
> >
> > The problem was in Qt::AA_EnableHighDpiScaling option.
> >
> > 13.01.2018 19:34, Denis Shienkov пишет:
> >> Hi all.
> >>
> >> Rigth now I faced with the strange issue is that the QML
> >> window size (screen) does not correspond to the display
> >> resolution.
> >>
> >> For example, I have the "ASUS ZenFone 4 Max ZC554KL"
> >> smartphone which has display resolution as 1280x720 pixels.
> >>
> >> But if I run there the QML application and try to print out
> >> the ApplicationWindow size, then it is 360x568 or 640x288
> >> pixels, depends on orientation. O_o
> >>
> >> I have checked the same and on other smartphones, and see
> >> that there the situation is similar. E.g. for the
> >> "Samsung Galaxy Ace 3 GT-S7270" with 800x480 display I got
> >> 320x460 or 533x247 pixels of my ApplicationWindow.
> >>
> >> For example if try to use the QtLocation module, then any
> >> maps looks ugly.
> >>
> >> It is very bad surprise for me... Because, seems, now I can
> >> not write any applications with high resolusion (or, at least
> >> to operate with a real resolutions from my QML code).
> >>
> >> Is there are any tricks to fix it?
> >>
> >> PS: Some Android's firmwares (e.g. Cyanogen) allows to change
> >> the DPI, and with the minimum DPI the ApplicationWindow size
> >> increases a bit.. But it is not an option anyway.
> >>
> >> BR,
> >> Denis
> >
> > _______________________________________________
> > Development mailing list
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
>
> _______________________________________________
> 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/20180115/433b8adc/attachment.html>
More information about the Development
mailing list