[Development] [Interest] qt-android: How to make QML application scaled on high DPI screen automatically
missdeer at gmail.com
Tue Mar 4 09:44:40 CET 2014
Thank Liang Qi, he told me that this bug is already fixed, you may get the
patch from the git repo and the commit id is
On Tue, Mar 4, 2014 at 2:34 PM, Yang Fan <missdeer at gmail.com> wrote:
> Thanks for your reply. I think this information should be shared with Qt
> developers, and I noticed the bug you mentioned was closed with no comment,
> I feel confused.
> On Tue, Mar 4, 2014 at 10:46 AM, Daiwei Li <daiweili at gmail.com> wrote:
>> Hi Yang and all,
>> I'm curious about how to scale for high DPI on Android as well, so I did
>> some reading of the Qt source today.
>> On iOS and OSX, scaling is handled by implementing devicePixelRatio() in
>> the respective QPlatformWindow implementations. On Android, the equivalent
>> concept seems to be "density":
>> Right now, the Android code uses the "scaledDensity" for certain things:
>> https://bugreports.qt-project.org/browse/QTBUG-29674, but not for
>> implementing the devicePixelRatio.
>> Can someone with domain knowledge weigh in on how scaling is supposed to
>> work? Otherwise, I'll experiment with hooking up devicePixelRatio to
>> DisplayMetrics.density and report back.
>> On Mar 1, 2014 7:41 PM, "Yang Fan" <missdeer at gmail.com> wrote:
>>> Hi list,
>>> I'm writing a cross platform application with QML, all things go well
>>> except running on high DPI Android device, it seems that it doesn't auto
>>> scaled correctly, the elements look small on the high DPI screen while it
>>> looks good on iOS device. I have got the physical dots per inch, it is
>>> about 210, I know I could get the factor from this value, and let all
>>> elements size multiply the factor manually, but I wonder if there is an
>>> easy way that let Qt handle this issue just like iOS port does.
>>> Any suggestion is appreciated.
>>> Fan Yang
>>> Interest mailing list
>>> Interest at qt-project.org
> Fan Yang
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development