[Interest] High DPI support in QT (Windows)
Prav
pr12og2 at programist.ru
Fri Sep 25 01:17:59 CEST 2015
> Behind the scenes the new 5.6 support is actually a rewrite, where
> we have moved the implementation from the platform plugins to QtGui.
I wonder why this is such a big problem with high DPI people started
talking about recently? People already suffered from element's size
which are not suitable for them ... imagine human with bad eyes ...
he needs larger elements ... even on low DPI's
Sooo ... it is not a problem of DPI ... the problem is that we design
in pixels for humans with visibility abilities as for designer or
programer ... this is the problem.
Why not to solve it once and forever by always asking in the QtDesigner
for relative values ... relative to some unit ... for example 10 units is
the height of font which user thinks as normal size for him.
And after that ask ALL sizes in QtDesigner in this units as
floats ... not an integer in pixels!
Including fonts ... so what it would not be in pt's ... because different
font with same pt looks smaller or larger.
How wonderful it would be if every font type with size 10 units in size is always
the same height as user thinks is comfortable for him!
After that this DPI problem will disappear ... as it does not matter how
big is pixel ... it matter how user feels about normal text size for
this device. People with good eyes could hate this automatic High DPI
scale feature as they could feel OK with small elements which gives
them more info on screen. So if user does have High DPI screen and
needs larger sized of all elements he just increases base-unit size
by 15%, 30%, 100% ... how he likes ... and have app's elements size
comfortable for him.
Do I miss something in this area or we still trying to solve the problem with
tricks like additional integer scale factor and IN THE END we
again will face users which do not like size of elements we have
chosen for them !?
>Behind the scenes the new 5.6 support is actually a rewrite
If it is rewrite ... why not to start do it right.
> The user-visible changes are the environment variables:
> QT_DEVICE_PIXEL_RATIO: deprecated, and replaced by
> QT_SCALE_FACTOR: which takes a numeric scale factor, and
> QT_AUTO_SCREEN_SCALE_FACTOR: (bool) reads the OS settings on X11 and Windows.
So in future 5.6 the scale factor will be only integer ... 50%
larger will not be possible!
> There is no corresponding C++ API for applications at this point.
> One way around that is to call qputenv() as the very first thing in main().
Why you start new things in this way? Start from hacks.
So scale factor would be 1) interger and even ... 2) unchangeable ...
Why it is not possible to create global set-function which we can call
... only hacks?
More information about the Interest
mailing list