How to Build for Windows XP Using MSVC 2015/2013/2012

To make your Qt application compatible with Windows XP (32-bit) you have to add the following line to your PRO file. Note that this will enable targeting for Windows XP without disrupting the application’s behavior in higher Windows versions.

QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01

You also need to install Visual C++ Redistributable for Visual Studio 2015. You can find Microsoft official link below:

https://www.microsoft.com/en-us/download/details.aspx?id=48145