Below I provided a simple step by step instruction on how to compile QT 5.7 with VS2015 assuming you already have VS2015 and Git client installed on your Windows machine.
To get QT 5.7 sources open Git Bash and run the following command (the repository has some submodules, so “recursive” option is required):
git clone --recursive https://github.com/qtproject/qt5.git --branch 5.7
Create a bat file called configureqt.bat with the following content:
set PATH=%PATH%;"C:\Program Files (x86)\Portable\ruby-2.3.0-i386-mingw32\bin";C:\Perl\bin;C:\Python27 D: cd D:\Repos\qt5\ set _ROOT=D:\Repos\qt5 set PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% set QMAKESPEC=win32-msvc2015 set _ROOT= configure -debug -nomake examples -opensource
Another alternative configuration (last line in the bat file) is:
configure -debug -confirm-license -opensource
it compiles QT with all the examples and does not ask to accept the license.
Open VS2015 Command Prompt x86 and run configureqt.bat. If everything went right run nmake and wait a few hours.
To create your first QT project in VS2015 go to Tools->Extensions and Updates and install Qt5Package:
Restart VS2015, Go to QT5->Qt Options and specify the path to QT binaries:
Go to File->New->Project and select Templates->Visual C++->Qt5 Projects->Qt Application:
Click OK, and select modules you want to include in your project:
and then lick Finish.