QT_ENABLE_HIGHDPI_SCALING has no effect?
-
I'm porting a project from Qt5 to Qt6, and have issues with the changed high DPI scaling behavior.
So I wanted to disable it for testing, like documented here.But I don't see any effect, no matter if I set QT_ENABLE_HIGHDPI_SCALING to 0 or 1.
I am working on Windows, so the caveats regarding Wayland and macOS don't apply.
-
On Qt6 the "HIGHDPI" is always on. It no longer is an option.
Yes, your app may look different on your device as a result and you may need to do some testing across different devices.
The good thing is that once you get this settled, your app will really have the same dimensions on different devices. Even using pixel sizes as those are not really pixels anymore. Much like webdevelopment uses pixels which are not pixels.
-
@TomZ said in QT_ENABLE_HIGHDPI_SCALING has no effect?:
On Qt6 the "HIGHDPI" is always on. It no longer is an option.
That may be the case, but the Qt 6.4. documentation also mentioned the QT_ENABLE_HIGHDPI_SCALING explicitly, so I am curious why that doesn't work.
-
@Asperamanca said in QT_ENABLE_HIGHDPI_SCALING has no effect?:
That may be the case, but the Qt 6.4. documentation also mentioned the QT_ENABLE_HIGHDPI_SCALING explicitly, so I am curious why that doesn't work.
You mean this ?
QT_ENABLE_HIGHDPI_SCALING Set to 0 to disable high-dpi scaling; effectively reverting to Qt 5 default behavior. Note that this has no effect on platforms such as Wayland or macOS - it does not disable any native high-DPI support. This variable is intended for testing purposes only, and we do not recommend setting it on a permanent basis.
-
@Asperamanca confirmed. Thank you so much!