After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791671 - Qt/HiDPI: scale apps by setting QT_SCREEN_SCALE_FACTORS
Qt/HiDPI: scale apps by setting QT_SCREEN_SCALE_FACTORS
Status: RESOLVED WONTFIX
Product: gnome-settings-daemon
Classification: Core
Component: xsettings
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2017-12-16 03:32 UTC by Peter Eszlari
Modified: 2017-12-28 17:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Eszlari 2017-12-16 03:32:50 UTC
To scale Qt apps in a Gnome session (X11) on a HiDPI screen, please do what KDE does and set QT_SCREEN_SCALE_FACTORS.
Comment 1 Rui Matos 2017-12-18 11:15:18 UTC
Sorry but no, that's an environment variable which means we can't change it at runtime when displays are attached/detached and besides, according to the documentation:

"
QT_SCREEN_SCALE_FACTORS [list] specifies scale factors for each screen. This will not change the size of point sized fonts. This environment variable is mainly useful for debugging, or to work around monitors with wrong EDID information(Extended Display Identification Data).

The format can be either a semicolon-separated list of scale factors in the same order as QGuiApplication::screens(), or a semicolon-separated list of name=value pairs, where name is the same as QScreen::name().
"

Which means we can't set it even if we wanted since we don't know neither the order nor the names.

We do set the Xft/DPI xsetting taking into account the appropriate scale so Qt could use that if it doesn't already. And, of course, for wayland apps scaling is properly supported in the protocol.
Comment 2 Peter Eszlari 2017-12-28 17:35:27 UTC
I filed a bug for Qt:

https://bugreports.qt.io/browse/QTBUG-65424