[Interest] QtCreator with very high resolution laptops

Etienne Sandré-Chardonnal etienne.sandre.chardonnal at gmail.com
Sat Mar 14 14:23:08 CET 2015


Hi Allan,
Where can I set the DPI? In the API?
Thanks

On 13 mars 2015, at 22:57, Allan Sandfeld Jensen <kde at carewolf.com> wrote:

> On Friday 13 March 2015, Etienne Sandré-Chardonnal wrote:
>> Hi,
>>
>> I just got a 1920x1080 14" laptop, this fairly high but not huge DPI. I
>> have set the Windows 7 scaling to 125% which is small but OK.
>> I migrated my Qt4 app to Qt 5.4.1 (at last...) and use the fusion style.
>>
>> With the default settings, it seems the app is not DPI aware : everything
>> is very small. I have tried the various WindowsPlatform = dpiawareness =
>> 0,1,2 in qt.conf, without any effect.
>>
>> I have tried setting QT_DEVICE_ASPECT_RATIO environment variable to 2. Then
>> the whole style is scaled, except the font, which stay exactly the same
>> size : very small.
>>
>> What can be the problem? All my UI was done with Qt4 designer, and for
>> instance the toolbox title bars use "MS Shell Dlg 2"font, size 8 (By the
>> way, I do not know why QtDesigner used this font everywhere)
>>
>> Thanks for helping!
> Try changing the DPI for instance to 120, it controls the size of the fonts,
> and fusion style should scale with it.
>
> Regards
> `Allan
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list