Brief
Prior to the introduction of the qt5.x environment, 5.7 began to support VS2015, in order to use the new development environment (typical obsessive-compulsive disorder), had to Qt5.7 + VS2015 environment to build.
In addition to the previous introduction of the building details, in fact, there are many need to pay attention to the part. Below, the main share of the building process and some of the issues to be noted.
Briefly install VS2015 installation Qt57 Configure qt Creator Configuration compiler config Debugger Hello World VS2015 Configure install plugin configure QT Hello world more references
Install VS2015
Enter the VS2015 official download page, download VS Community Edition-Visual Studio Community.
After the download is complete, install directly, fool-next.
Note: When installing VS2015, remember to check the "Visual C + +" option. Install Qt5.7
Access to Qt official download page, download Qt5.7, I downloaded is: Qt-opensource-windows-x86-msvc2015_64-5.7.1.exe.
After the download is complete, install directly, fool-next.
Note: This is not complete, as the resulting configuration is not ready, so let's look at how to configure the compiler and debugger.
In order to be able to use Qt Creator and VS2015 at the same time, they must be configured in a series of different configurations. Configuring Qt Creator Configuring compilers
If the compiler is not detected, in most cases, the Visual C + + option is not checked when the installation VS2015.
Note: The detection does not matter, do not unload load loading (the problem of unloading load load, restart the machine, can only say: Really powerful, Word elder brother.) ), only need to modify it.
Go to the Control Panel-> programs and features, locate Microsoft Visual Studio Community 2015 Updates, and right-click to select Change.
Check the "Visual C + +" option, install it again, and fix it.
At this point, open Qt Creator, into the compiler section, you can see that QT has been automatically detected, do not need to manually configure.
You can see that the warning symbol shown earlier in the Automatically detected build suite, and "None" in the debugger section, indicates that the debugger has not been configured.
Configuring the Debugger
The debugger is not available by default, and you must manually download the WinDbg.
During the installation process, you will need to check "debugging Tools for Windows".
After the installation is complete, turn on Qt Creator (if it is already open, close and then reopen). At this point, you can see that Qt has automatically detected the debugger, it is very simple.
In the build kit (KIT), select the Automatically detected debugger.
Hello World
Can't wait, then quickly write a Hello World debugging.
VS2015 Configuration Installing Plug-ins
QT add-in can be used to integrate QT before VS2015, but in Visual Studio 2015 the QT plugin is not available, but provides an extension (tool-> extension and update ...). ):
Select: Online, search for the keyword "Qt", the relevant plug-ins will appear:
You can see two very similar plug-ins:
QT Visual Studio Tools (2015): The creator is "the QT company Ltd", and the screenshot in the lower right corner shows that this is exactly what we want to plug in.
Qtpackage: The creator is "Konstantin Stukov" and the screenshot in the lower right corner is similar to the above. This package can also be downloaded at qtpackage.
Choose which is better. When not clear, always determine a point, choose the most trusted ... That must be the official Qt Visual Studio Tools (2015).
After installation, restart VS2015, and you will see the "Qt VS Tools" menu item on the menus bar:
Configuring Qt 5.7
Options: qt VS Tools-> qt Options, configuring QT 5.7. Click the "Add" button, Path select D:\Qt\Qt5.7.1\5.7\msvc2015_64, and then click "OK" to save.
Hello World
Configure the environment to quickly test it, write a small program, the most familiar Hello world.
Select: File-> new-> project, then select: Template-> Visual C + +-> qt-> qt GUI application.
After you enter the name of the project, click the OK button.
At this time, will automatically generate the corresponding code, simply to compile, run it. More References QT Environment Build (Visual Studio) QT environment (QT Creator)