How To Embed Manifest File Into Qt 4.8.5 Executable

There are two ways to control High DPI Scaling for your Qt 4.8.5 compiled Windows executable:

– Manually set High DPI Scaling via right-clicking on your Windows executable and changing it in the Compatibility tab. However, this modifies the Windows Registry. And we don’t want to deal with it.

OR

– Embed an XML .manifest file into the Windows executable itself so that it is always reliably set every time the program is run. And if the user moves the executable to another location, it will still run with our intended high dpi scaling settings.

1. Create a basic text file with this EXACT content and save as your-exe-name.exe.manifest in your project folder.


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
 <application>
  <windowsSettings>
   <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
   <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
  </windowsSettings>
 </application>
</assembly>

Continue reading “How To Embed Manifest File Into Qt 4.8.5 Executable”