Unsolved disable windows dpi setting.
-
Using Windows 8.1 64Bit + Using Qt 5.4
Windows 8.1 Display Settings-> Magnification Settings
Small (100%) Medium (125%) Large (150%) Small was selected.
And if you run the developed program and change the window magnification setting to large, the text inside the program will be bigger.
Do you know how to get a small (100%) value regardless of the window magnification setting value?
I set it in qt.conf but it doesn't change.
[Platforms]
WindowsArguments = dpiawareness=0or
[Platforms]
WindowsArguments = dpiawareness=2 -
add
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
to the beginning of your main() function
-
@gde23
Actually i think he wants to try
Qt::AA_DisableHighDpiScaling -
Hi, I had the same problem, solved it by placing a qt.conf next to the .exe with these 2 lines:
[Platforms]
WindowsArguments = dpiawareness=0Maybe Qt 5.4 doesn't support (too old?) passing the setting via qt.conf, you could try instead starting your .exe file from a CMD window:
your-exe-file -platform windows:dpiawareness=0
-
@ gde23
@mrjjUnfortunately, I am using Qt 5.4 version,
Qt :: AA_DisableHighDpiScaling
can not use.@hskoglund
where is the qt.conf file
I tried to find the same file on the C drive, but it didn't work. -