1, brief introduction

Qt Is a famous cross platformC++ GUI application development framework. It's not just a GUI library, More like a“ One-stop” Solutions for, You don't need to study anymore
STL, You don't have to go around looking for resolution anymore XML, Connect to database, Access to various third-party libraries of the network, because Qt Built in these technologies.

2, Related links

Official website:https://www.qt.io/ <https://www.qt.io/>
Official download link:
http://download.qt.io/ <http://download.qt.io/>
Qt Download links:
http://download.qt.io/archive/qt/ <http://download.qt.io/archive/qt/>
Qt Creator Download links:
http://download.qt.io/archive/qtcreator/
<http://download.qt.io/archive/qtcreator/>
Qt VS Development plug-in download link:
http://download.qt.io/archive/vsaddin/ <http://download.qt.io/archive/vsaddin/>
Qt Official document link:
http://doc.qt.io/ <http://doc.qt.io/>

3,Qt,Qt Creator,Visual Studio, Relationship with compiler

Qt It's like a sealed one SDK.
Qt Creator Equivalent to a IDE, And Visual Studio Similar different products.
IDE You can use the specified compiler and debugger to compile and debug programs.

Visual Studio Default to Microsoft's - Microsoft Visual C++ Compiler(cl.exe) To compile a program, Use
Debugging Tools for Widows(cdb.exe) To debug the program.

Qt Creator You can use Microsoft's compiler and debugger to develop, It can also be used MinGW(GCC) Compile, Use GDB As debugger.

Sum up,Qt stay Windows Several schemes of development environment under:

IDE Compiler debugger
VS cl cdb
Qt Creator cl cdb
Qt Creator MinGW(gcc) gdb
Be careful: When used vs To developqt Application time, Need to install an official VS Development plug-ins, There's a link on it.

4, aboutQt Quick,QML

Qt Quick yesQt 4.7 A new technology introduced in(QML Framework), Let users use
QML Develop applications faster and more efficiently, Aimed atUI Separation from background logic maximization, Unified desktop and mobile.
QML yes Qt Quick A scripting language supported in development framework, Similar function html + css + js Combination, It's just that there's a difference.
import QtQuick 2.4 import QtQuick.Window 2.2 import QtQuick.Controls 1.2 /*
This is a multiline comment, andc The same language */ // Of course, it's a single line comment Window { id:root; //
Window Elementalid, It should be guaranteed hereqml Unique name in file visible: true; width: 460; // Specify the width of the window directly height:
288; // Specify the height of the window directly Image { id: bg; width: parent.width; // The width of the picture depends on the width of the parent window height:
parent.height; // The height of the picture depends on the height of the parent window source: "qrc:///images/sky.jpg" // Quote a picture }
Image { id: rocket; x: (parent.width - width) / 2; // Picture position horizontal center y: 40; //
Picture position distance from parent window40 source: "qrc:///images/rocket.png"; } Text { // Not specifiedid, That is, this is an anonymous element
y:rocket.y + rocket.height + 20; // Text top distancerocket Bottom of picture20
anchors.horizontalCenter: parent.horizontalCenter // Set text horizontal center text:
qsTr(" Rocket launching!"); // Set text for text display color: "#ff2332"; // Set text color font.family: " Regular script"; //
Set font to italics font.pixelSize: 30; // Set text size } } // from :
https://www.cnblogs.com/csulennon/p/4485768.html
Qt Quick Application yesQML andC++ Combination, It's more suitable for interface class.
Qt Widgets Application It's traditional. c++ frame.

5,Qt Differences between versions

6,VS + VS Development plug-ins + Qt Environment building

*
Install the appropriate version of Visual Studio

I installed vs2013, This is not introduced

*
download Qt, install

The version I downloaded is:
http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.3/5.3.2/qt-opensource-windows-x86-msvc2013_64_opengl-5.3.2.exe

<http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.3/5.3.2/qt-opensource-windows-x86-msvc2013_64_opengl-5.3.2.exe>
You can download it as you need, The default installation is enough.
My installation path is:
C:\Qt\Qt5.3.2
C:\Qt\Qt5.3.2\5.3\msvc2013_64_opengl
Be careful: If you want to generate32 Bit application, Still need to download another one32 Bit version:
http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.3/5.3.2/qt-opensource-windows-x86-msvc2013_opengl-5.3.2.exe

<http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.3/5.3.2/qt-opensource-windows-x86-msvc2013_opengl-5.3.2.exe>
Please change the directory during installation, such asC:\Qt\Qt5.3.2_x86

*
download VS Development plug-ins, install

The version I downloaded is:
http://iso.mirrors.ustc.edu.cn/qtproject/archive/vsaddin/qt-vs-addin-1.2.4-opensource.exe

<http://iso.mirrors.ustc.edu.cn/qtproject/archive/vsaddin/qt-vs-addin-1.2.4-opensource.exe>
Default installation

*
Set up

Stay up3 After all are successfully installed, open vs2013, You will find that there is one more menu barQT5 Menu.
Stand alone this menu, ChoiceQt Options, Select in the pop-up dialog boxQt Versions tab, Click on theAdd Button, New settings will pop up Qt Version dialog, stay
Version name Enter version name in( Optional),Path Input in Qt Installation location.
What I set up is:
Version name : msvc2013_64_opengl_532
Path : C:\Qt\Qt5.3.2\5.3\msvc2013_64_opengl

*
New test project

After setting, stay vs Select new item from the menu of. You will find that there is one more in the project template Qt5 Project Options, Select on the rightQt Application
, Fill in project name and location, Determine, There is a project setting in the project wizard, You can choose the components you need, such as
Quick,QML,Newwork,OpenGL,SQL,WebKit,XML. Click Finish, It creates a default empty Qt Project.

*
Compile and run

Qt The default output directory of the project is Win32\Debug,Win32\Release,x64\Debug,x64\Release.
If you compile, AppearQt Module computer type“x64” And target computer type“X86” Conflict like error,
The solution is to right-click on the current project, ChoiceQt Project Settings, stayProperties TabVersion Select the corresponding
Version name.
And according to Qt Version, Select the right item in the platform of project properties(Win32 or x64),
Still in Linker- senior- Target calculator Select the correct item in(MachineX86 (/MACHINE:X86) or MachineX64
(/MACHINE:X64))
Be careful: Compile32 Bit sum64 When the application of bit, The corresponding Qt Edition, Corresponding Version name, If it's installed on your computer at the same time32 Bit sum64 Bit Qt.
Pack:
At the start menu, Select the appropriate version of Qt Command line tools “Qt 5.3 for Desktop (MSVC 2013 OpenGL)”,
Switch to packaging directory,( such as ***\Packet\), Copy the application to it first( For example, called QtDemo.exe),
Enter in the command line:
windeployqt QtDemo.exe It's going to take all Qt Copy all dependencies to packaging directory.