I assume that since you posted the link, you have installed the Qt VS Tools extension. You have to configure the tool to point to your compiled Qt distribution (not the source code).

In Visual Studio 2022, there is an Extensions -> Qt VS Tools -> Options menu. If you execute that, you will see this dialog:

Capture.jpg

On my PC, I have three Qt versions installed. If you haven't added yours, click Add and browse to the top level directory of the binary version (the one that contains include, bin, and other subdirectories). If you have more than one installation, click the Default button to chose which one is used in Visual Studio as the default version.

Then in your Project Properties, go to Qt Project Settings and be sure $(DefaultQtVersion) is set for the Qt Installation property:

Capture2.jpg

If you did not originally create your project using the Qt VS Tools template in the Create new project wizard, then you will probably need to do that and then add all of your source files to this new project. The Qt Widgets Application wizard will correctly configure your .vsproj file to connect to your Qt installation for include and lib files.

Capture3.jpg