DPI scaling: QT_AUTO_SCREEN_SCALE_FACTOR and qt.conf

On Windows 10 I have DPI scaling set to 125%. But for some applications like Shotcut, I want to override this to get more screen space. Usually this is done in Windows by setting DPI Scaling override to “Application”. But Qt applications don’t seem to respect this.

So I have been using the environment variable “QT_AUTO_SCREEN_SCALE_FACTOR=0” to avoid Windows DPI scaling setting the Shotcut UI too large. But I’ve noticed this also affects other Qt applications so I want to enable this for Shotcut only.

At this point I have several options:

  1. Create a .cmd file to set the variable and then run Shotcut.
  2. Change the target of the launching shortcut to “cmd.exe /c set QT_AUTO_SCREEN_SCALE_FACTOR=0 & D:\bin\Shotcut\shotcut.exe”

Neither of these are very elegant… :confused:

So my question is: Can the QT_AUTO_SCREEN_SCALE_FACTOR variable be set elsewhere, for instance in a user configuration file, for instance qt.conf? I see there’s a qt.conf in the installation, but I assume this gets overwritten on update - and not even sure if it’s possible to set there?

No, unfortunately. For the next version 19.02 I added command line options --QT_SCALE_FACTOR and --QT_SCREEN_SCALE_FACTORS for High DPI displays. You can read more about these options on Qt Documentations High DPI Displays. When you supply one of these, it also sets QT_AUTO_SCREEN_SCALE_FACTOR=0. It is not possible to expose this through a configuration file or in the Settings menu.

Please test with set QT_AUTO_SCREEN_SCALE_FACTOR=0 & set QT_SCALE_FACTOR=1 & D:\bin\Shotcut\shotcut.exe to verify that it gives you the result you desire.

Thanks Dan!

I tested a bit with the different variables. For me, setting QT_AUTO_SCREEN_SCALE_FACTOR=0 on the command line and then launching Shotcut does what I want.

QT_SCALE_FACTOR I think overrides the auto setting, and setting it to 0 or 1 makes no difference from what I can tell. Setting zero here should turn off scaling but it doesn’t. Setting it to >1 does scale things and will be very useful for the people on 4K displays I think. My issue is kind of the opposite, as I want to disable scaling explicitly for Shotcut.

QT_SCREEN_SCALE_FACTORS is tricky to test, as I don’t really know the order of the displays as returned by the functions mentioned in the docs. I tried:


But it just crashed Shotcut (got a dump).

If you are able to add QT_AUTO_SCREEN_SCALE_FACTOR to the launch parameters in an upcoming version too, it would certainly solve the issue for me. Otherwise I’ll just stick with setting QT_AUTO_SCREEN_SCALE_FACTOR=0 in the launch command, it’s not a big deal, just not very elegant but I can live with that :grin:

This topic was automatically closed after 90 days. New replies are no longer allowed.