To build the Qt sources by your own you have to do the following steps:
- Download and install Visual Studio 2015. I took the Community edition.
- Download and install Qt. I took the Visual Studio 2015 Desktop version.
- Download and install Python. It has to be installed to compile QML.
- Open the Visual Studio ‘Developer Command Prompt for VS2015’: Windows Start – Visual Studio 2015 – Developer Command Prompt for VS2015
- Than run the following command chain
>> cd "Path/to/the/Qt/source/folder/" (in my case C:\Qt\5.7\Src) Follow this link to get more information about the configuration parameters. In my case I recompile the source code to use OpenGL. >> configure -opengl -desktop -platform win32-msvc2015 The supported platform parameter could be found in this directory: 'C:\Qt\5.7\msvc2015_64\mkspecs'. The parameter title is the directory name. >> nmake Now lay back and drink a coffee. It will at least last a hour...
- For using OpenGL insert the following to your pro file
QT += qml quick opengl LIBS += 'C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/OpenGL32.Lib' (in my case, just search for the OpenGL32.Lib)
- Congratulations! Now you can start with QML and OpenGL!