I inherited an old app developed in C++/Qt. When run on Windows machines with modern high-resolution screens, it gets displayed incorrectly (due to scaling). I figured out I can create a qt.conf
file with the following contents and place it in executable directory:
[Platforms]
WindowsArguments = dpiawareness=0
The problem with this solution is that the config seems to get applied only for the first run. So when I place the qt.conf
file in the bin folder and start the app for the first time, it gets displayed correctly. When I close the app and start it again, it gets displayed in scaled mode - seems like the config file is not getting applied any more. What's interesting, thought, if I rename the executable, once again the config gets applied on first run and discarded on another runs.
Any hints?