[Development] QTBUG-95930 / QTBUG-99546 need some attention

Morten Sørvig Morten.Sorvig at qt.io
Mon May 9 16:07:23 CEST 2022


On 8 May 2022, at 21:02, Ilya Fedin <fedin-ilja2010 at ya.ru<mailto:fedin-ilja2010 at ya.ru>> wrote:

9 months has passed since the initial report and it's still in a state
where it's unknown is it a bug or an intended behavior. Would be nice


Thanks for the reminder! This is about the behaviour of the QT_SCREEN_SCALE_FACTORS environment variable, and if I recall correctly the current consensus there is “keep it working exactly as-is”, so the subject of changing its behavior is a good candidate for discussion on this list.

In short, the issue is with how QT_SCREEN_SCALE_FACTORS and QGuiApplication::highDpiScaleFactorRoundingPolicy should interact. HighDpiScaleFactorRoundingPolicy can be set to either round fractional scale factors (1.75 -> 2), like Qt 5 does by default, or to pass them through unmodified, like Qt 6 does by default.

As the bug states, QT_SCREEN_SCALE_FACTORS currently ignores this completely and there is never any rounding. The options are:

 a) This is intended behavior: Qt’s environment variables empowers users to override settings. If the user wants to use rounded scale factors then they can set QT_SCREEN_SCALE_FACTORS to a rounded value.

 b) In practice, QT_SCREEN_SCALE_FACTORS has become a system setting since it’s being set on behalf of the user. This means the values should be subject to rounding according to highDpiScaleFactorRoundingPolicy property, like with other system DPI settings.

If we want to change, then we should also consider if we want to do that for 5.15.x (which I think we can, If we consider it to be a bug-fix).

Regards,
Morten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20220509/c0a7895c/attachment.htm>


More information about the Development mailing list