Article Directory
1 premise
1.1 Visual studio2017
Is an integrated development IDE: Integrated Development Environment (IDE, Integrated Development Environment) is an application used to provide a program development environment, generally including tools such as a code editor, a compiler, a debugger, and a graphical user interface. Integrated development software service suite with code writing function, analysis function, compilation function and debugging function. All software or software suites (groups) with this feature can be called integrated development environments.
1.2 QT
Qt is a cross-platform C++ graphical user interface application development framework developed by Qt Company in 1991. It can develop GUI programs as well as non-GUI programs, such as console tools and servers. Qt's own editor is called qt creator
1.3 Why use QT+VS co-programming
Qt is divided into two parts: IDE and editor. We use the IDE of qt but not the editor qt creator of qt. Instead, we use VS2017 as the editor. Because qt creator has more bugs, vs2017 supports writing qt and is easier to develop. You can also combine qt with other plugins supported by VS2017 to run
1.4 Install the software version
System: Windows 10 x64 bit
Visual studio: 2017 community edition (Visual studio 2017 community)
Qt: 5.14
2 Software download and installation
2.1 Visual Studio 2017 community installation
Download URL: Click here to download VS2017.
You need to log in to your Microsoft account. If you don’t have one, you can register one (
simplified Chinese is not required) , and then download the community version.
Finally, do not download to the C drive
and open it after the download is complete. Click Continue and wait for the download Finish
Choose to use the c++ desktop development, install it in the default location and
wait for the download to complete (you can install qt first in the waiting process). The
default is just fine
2.2 QT installation
Qt download address: Click here to
download The 2.5g one is a
bit big. Wait patiently
and open the software after the download is complete. You
may need to register a qt account first, and then log in.
I installed it on the F drive (install it anywhere, just remember). It’s
not necessary to select all.
Wait for the
installation to complete and you can see the recent A lot more in the installation
3 visual studio install qt extension plug-in
Open vs2017,
close vs2017, wait for the installation to complete, and restart. There is
one more qt vs tools in the title bar.
Next, configure the environment variables
. The folder is in your installation location
4 Configure system environment variables
If you want to program with qt creator, use the same method to add mingw73_32 or mingw73_64 to the environment variable
Click OK to close variable settings
5 Write the first program to run hello world
Open vs2017
You can change the location of the generated file, or not change it. My project name is FirstDemo
Click to confirm. The
default is good. The
main interface is
double-clicked to open the ui design interface.
You can introduce space by dragging and dropping.
Just insert a label plug-in,
press ctrl+s to save, close the ui design interface, and run
helloworld to complete
7 Run the qt program you wrote on other computers
1 Open the Qt console of the local computer and
select the one you compiled to open
. Enter the location of your compiled exe file here
and then enter windeployqt
+ program name
You will find that there are many more files in your files, and you can run them on other computers.