Use of QtCreator

Record it for later use.

Basic computer configuration:
Win10 64-bit

insert image description here

Description of the problem:
After installing the following qt5.8.0,
insert image description here
according to the online method https://blog.csdn.net/qq_33528803/article/details/97259480[1]
, the simplest program was created casually, but when running The following questions are solved, as shown in Figure 1-4.

figure 1

insert image description here

figure 2

insert image description here

Figure 3 Click to run, and the compilation error in the figure appears.
insert image description here

Figure 4 The contents of the compiler submenu are not automatically recognized

Solution: Qtcreator must be used together with VS. That is to say, it is impossible to use Qtcreator normally if only Qt is installed on the computer, and the corresponding version of VS must be installed on the computer at the same time. I am using qt5.8.0, which corresponds to VS 2015. So why do I need to install VS? According to online searches, VS should provide a compiler for QT, so if VS is not installed, qt will not have a compiler to use.

Solution process:
Install VS2015.
First, get the installation package (download address https://visualstudio.microsoft.com/zh-hans/downloads/; if you don’t have an account, you need to register one. My account is email, and the password is “miss system Class Classic"), run the following exe after decompression. As shown in Figure 5, and then follow the wizard to install. However, when choosing the installation type, you must select "Custom", and you must select "Visual C++" under "Programming Language" (other languages ​​are optional). The following is the VS2015 installation process shared by CSDN netizens https://blog.csdn.net/weixin_29599033/article/details/113322867, just follow this process. Also note that if your computer has installed other versions before, be sure to uninstall them in the control panel, as shown in Figure 6, including all related plug-ins.

insert image description here

Figure 5

insert image description here

Figure 6
After installation like this, open the Qt program just now, find the artifact, Figures 1 and 2 have changed to Figures 7 and 8, run the program, the problem in Figure 3 is gone, and Figure 4 has become Figure 9 look.
The problem is solved. November 09, 2022 water

insert image description here

Figure 7

insert image description here

Figure 8

insert image description here
Figure 9

Summary: For relevant content, please go to the WeChat public account [Dongguan Scientific Research] to discuss and communicate.
insert image description here

Supongo que te gusta

Origin blog.csdn.net/u014751362/article/details/127841887
Recomendado
Clasificación