Code snippets‎ > ‎C++‎ > ‎

Qt

Installation

To link with a static CRT:
Summary edit: qtbase\mkspecs\win32-msvc2013\qmake.conf and change "-MD" to "-MT".

Building a shared Qt library (release only, no debug-dll's needed).

From a visual studio shell:
cd qtbase
nmake confclean
cd ..

configure.bat -debug-and-release -
qtnamespace qt -opengl desktop -mp -no-ltcg -no-compile-examples -opensource -platform win32-msvc2013 -opengl desktop -prefix d:\libraries\qt\Qt5.2.1_32

nmake install


For 64 libraries, start a windows 64 bit command prompt and enter (yes, the platform is win32):
cd qtbase
nmake confclean
cd ..

configure.bat 
-debug-and-release -qtnamespace qt -opengl desktop -mp -no-ltcg -no-compile-examples -opensource -platform win32-msvc2013 -opengl desktop -qtlibinfix 64 -prefix d:\libraries\qt\Qt5.2.1_64

nmake install



Edit:

configure.bat -debug-and-release -qtnamespace qt -opengl desktop -make tools -D _ITERATOR_DEBUG_LEVEL=0 -mp -no-ltcg -no-compile-examples -opensource -platform win32-msvc2013 -opengl desktop -qtlibinfix 64 -prefix c:\source\libraries\qt\Qt5.4.1_64
nmake install

cd qttools
qmake qttools.pro
nmake

Slow initialization of Qt
When creating a QApplication is extremely slow on some computers, this might be caused by scanning the PC for qwindows.dll. This is caused when using a custom platformpluginpath (<executable> -platformpluginpath <dir>). To improve initialization, you should put qwindows.dll in the platforms directory and not specify a custom platformpluginpath.

Extensions

Libraries with additional widgets:
Subpages (1): Usefull Qt links
Comments