You need to build Qt yourself from the source. You will definitely want to keep two Qt assemblies. For debugging you should use the general assembly, as this has reasonable link times. For release, you should use a static assembly, specifically with generation of communication time code, to reduce the executable and expect that assembling a trivial application will take about a minute. This is because the βlinkβ does generate native code for Qt and your application, and the code is specific to your application, which makes it generally more efficient.
As you do this, without losing disk space for multiple copies of the source, use the built-in Qt assemblies outside the source. So far, the static Qt 5.1.1 line has been broken, so the following works only for Qt 4 with Visual Studio.
Download the source, say C:\Qt\4.8.5 .
Create C:\Qt\4.8.5-shared . Open the visual studio console, there is a CD and run C:\Qt\4.8.5\configure.exe -shared with any other parameters that you may have. Then build it with nmake or jom .
Create C:\Qt\4.8.5-static . Open the visual studio console, there is a CD and run C:\Qt\4.8.5\configure.exe -static -ltcg with any other parameters that you may have. Then build it with nmake or jom .
You need to bind plugins statically to your application build version .
Qt Creator makes it easy to use multiple Qt assemblies in parallel. I usually build using both Qt 4 and Qt 5, both static and general, with local fixes for Qt 5 to make the static build work.
source share