VS2017 configures Qt5.14 (detailed tutorial)

1 VS2017 download and installation

Official download link: https://visualstudio.microsoft.com/zh-hans/free-developer-offers/

insert image description here

2 Qt5.14.2 download and installation

Qt5.14.2 download and installation (nanny-level graphic tutorial)

3 VS2017 configure Qt5.14.2

After installing VS2017, there is no Qt in the VS menu bar, and you need to download it yourself.

Select Tools -> Extensions and Updates

insert image description here
Select Online, and search for Qt in the search box on the right, download

insert image description here
long wait…

insert image description here
If you cannot download for a long time, you can choose another method.

Download directly from the Qt official websiteQt Visual Studio Tools

Official download address: https://download.qt.io/development_releases/vsaddin/
insert image description here
Select the required version to download, here select the latest version 2.8.1, and select the version corresponding to VS to download. Soon, it's over with a snap.
insert image description here
Double-click the downloaded installation package
insert image description here

Before installation, please close VS, otherwise the installation will fail, and the following prompt will be given. The installation will continue after closing VS.
insert image description here
Installing...
insert image description here
Installation complete!
insert image description here
At this time, we opened VS and found that it has been added to the menu bar, Qt VS Tools
insert image description here
but Qt cannot be used in VS at this time, and the Qt version needs to be specified.

Select Qt Versions
insert image description here
to add a new Qt version
insert image description here

The path selected qmake.exein Path can refer to the following directory

D:\Qt\Qt5.14.2\5.14.2\msvc2017_64\bin

insert image description here

insert image description here
Configuration is complete!

4 test

Create a blank form project
insert image description here
and directly debug and run, the following interface appears, saying that the configuration is successful.
insert image description here
However, the .uifile cannot be opened at this time (Qt Designer, Qt Designer). Select the Options option under Qt VS Tools , and change the Qt Designer Run in detached windowfrom default toFalse .True

insert image description here
This will open Qt Designer normally.
insert image description here

Guess you like

Origin blog.csdn.net/weixin_46098577/article/details/122131488