Development of Qt application environment under VS

Release Notes

vs 2019
QT5.14
insert image description here

insert image description here

I followed the installation of QT basic components before , but this installation is only the most basic components. If you want to use QT in VS, you have to install other components. The following installation process,

Environment construction steps

QT new components

I have installed QT before, and now I need to add a new package.
After Qt is installed, how to add and remove components

insert image description here

Run MaintenanceTool.exe
insert image description here
insert image description here
insert image description here
insert image description here

QT This operation requires at least one valid repository that is enabled

Follow the steps below, "Add", fill in the address of the temporary data repository: http://mirrors.ustc.edu.cn/qtproject/online/qtsdkrepository/windows_x86/root/qt/

insert image description here
Solution reference

insert image description here
insert image description here
An error occurs: the missing dependency of preview.at.56.qtscript cannot be found
Solution:

insert image description here
insert image description here
insert image description here

insert image description here
Successfully entered the page for adding components:
insert image description here
insert image description here
insert image description here
5.14.2 can only add these things here. .

5.15.2 supports VS2019, so after selecting 5.15.2,
insert image description here
just remove a few that are definitely not needed
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
Too much time here. . . . And it feels like something is stuffed into the C drive. .
Just uninstall and reinstall. . . . . .
insert image description here

insert image description here
insert image description here

Reinstall QT

insert image description here
insert image description here

insert image description here

Installation is still very resource-intensive. . .
insert image description here
insert image description here
You can see that the programs written before can be indexed, haha ​​(keep the folder location consistent)

insert image description here

Configuration in VS

Configuration in vs
insert image description here
Search for Qt, click to download Qt Visual Studio Tools
insert image description here

insert image description here
insert image description here
insert image description here
Restart QT
insert image description here
insert image description here
and find qmake.exe under the path where QT is installed, and
insert image description here
insert image description here
add the two previously installed

insert image description here
Create a new project:
insert image description here

insert image description here

insert image description hereSelect the base class as QWidget, you can check Lower case file names by yourself
insert image description here

The problem encountered;
when using Qt Designer to open the ui file, it will flash back and report an error.
insert image description here
Right-click the ui file, add a new opening method, and find the path of QtCreator.exe. And set QtCreator as the default opening method of .ui
insert image description here

D:\Qt\qt5.14.2\Tools\QtCreator\bin\qtcreator.exe

insert image description here
insert image description here
Run
insert image description here
adjust color to white:
adjust color
insert image description here

reference article

Guess you like

Origin blog.csdn.net/qq_41701723/article/details/132026959