Qt for Windows - Specific Issues

This page contains information about Qt for Windows.

Windows XP

Targeting XP with Visual Studio 2012 and later

Visual Studio 2012 and later do not support building for Windows XP out of the box. However, support for targeting XP was added in an update of Visual Studio 2012. This works also with Visual Studio 2013.

You need to compile Qt from sources. Set up an environment on the command line, for example

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
set PATH=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%
set LIB=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;%LIB%
set CL=/D_USING_V110_SDK71_

Then run configure with the -target xp argument:

configure -target xp <other arguments>

Note: The configure option -qtlibinfix cannot take a version number as an argument. For example: -qtlibinfix 5.6.0 should be specified as -qtlibinfix QtCore5.6.dll.

Also compile your own application in the above environment if compiling on the command line. If you use Visual Studio, set the v110_xp toolset in the project's property pages.

Installation location

Installing Qt into a directory with spaces, for example, C:\Program Files, may cause linker errors like the following:

c:\program.obj not found

Install Qt into a sub-directory without spaces to avoid this problem.

Possible GL conflict

There is a known issue when running Microsoft NetMeeting, Lotus SameTime, and other applications that require screen grabbing while direct rendering is enabled. Other GL-applications may not work as expected, unless direct rendering is disabled.

GCC (MinGW-builds)

The minimum version of MinGW-builds supported is GCC 4.7.2. MinGW-builds GCC 4.7.2 32 bit, rev 8 and later should be able to build Qt.

For more information about the MinGW builds, visit the Reference Configuration section of the supported platforms page.

Intel C++ Compiler (Windows, Altix)

Qt has been tested successfully with:

  • Windows - Intel(R) C++ Compiler for 32-bit applications, Version 9.1.040.
  • Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030

Visual Studio

The Visual C++ Linker doesn't understand filenames with spaces (for example, C:\Program files\Qt\) so you will have to move it to another place, or explicitly set the path yourself.


If you are experiencing strange problems with using special flags that modify the alignment of structure and union members (such as /Zp2) then you will need to recompile Qt with the flags set for the application as well.

Visual Studio 2010 should be updated to Service Pack 1. Otherwise, a problem when compiling Qt for 64-bit in release mode may occur (visit http://support.microsoft.com/kb/2280741).

Consult the Qt for Windows - Requirements page for specific versions of the Windows SDK.

Fullscreen OpenGL Based Windows

When a window is using an OpenGL based surface and is appearing in full screen mode, problems can occur with other top-level windows which are part of the application. Due to limitations of the Windows DWM, compositing is not handled correctly for OpenGL based windows when going into full screen mode. As a result, other top-level windows are not placed on top of the full screen window when they are made visible. For example, menus may not appear correctly, or dialogs fail to show up.

A window can use an OpenGL based surface either explicitly when setSurfaceType() is called, or when something that requires OpenGL is used inside the window, causing the whole window to be OpenGL based. For example, QOpenGLWidget or QQuickWidget can trigger this. However, if the surface is contained in a QWindow which is hosted with createWindowContainer(), or the obsoleted QGLWidget is used and it does cover the entire full screen window, then this problem does not occur.

To solve this problem, a QWindowsWindowFunction can be used to enable a native Windows flag which will set WS_BORDER when showing in full screen mode. This can be utilized as follows:

QWindowsWindowFunctions::setHasBorderInFullScreen(tlwWindow->windowHandle(), true);

This will give the full screen window a 1-pixel border, thus enabling the other top level windows to appear on top.


Qt has been tested successfully with Clang 3.8(llvm svn rev. 256453 and clang svn rev. 256453). Visual Studio 2015 Update 1 was used to build clang. Mkspec is using the clang-cl tool to build Qt. Clang 3.8 does not support precompiled headers.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.