Qt installation in visual studio 2019

Viewed 7979

I have downloaded Qt for open source development and installed it.I installed 5.15.0 version:

but when I enter VS 2019 Qt vs tool are not added in my main menu:enter image description here

which is not problematic because I have it in my extentions:

enter image description here

but the problem is when I want to create a gui application there is no such thing:

enter image description here

Any idea what should I do or what should have done which I didn't?

my instructor showed something like this:

and chose Qt GUI Application, but I don't have that.

1 Answers

Your picture shows the menu to add stuff to existing project.

To "create a gui application" with Qt in Visual Studio 2019 you will need to create a new project (File -> New -> Project) and here inside the search bar type qt that will find the projects templates related to Qt and you'll have Qt Widgets Application in there (or Qt Quick Application if you want to use QtQuick/qml).

For all this to work you also need to setup Visual Studio's Qt extension to find the Qt framework you installed on your system. To do that go to Qt Options (Extensions -> Qt VS Tools -> Qt Options) and in tab Qt Versions click Add button: here insert something like Qt5.15.0 for version name and the path where you installed Qt frameworks on your system the default will be: C:\Qt\5.15.0\msvc2019_64.

Related