Reputation: 39
AM trying to develop an application using qt and visual studio. In my application, I want to access network, but using QNetworkAccessManager I got an error like 'Cannot open include file: 'QNetworkAccessManager': No such file or directory'
. How can i resolve this?
Upvotes: 2
Views: 334
Reputation: 643
In Visual Studio 2022, after clicking on Extensions -> Qt VS Tools -> Qt Project Settings, Click on these when the menu dialog appears
Then click on Network
Upvotes: 0
Reputation: 7034
QNetworkAccessManager is a class from network module of Qt, so in order for you to use that class you'll need to add it's headers to include path and link to the network module library.
To do that (for a Qt module) in Visual Studio:
Qt VS tools
menuQt project settings
, Qt Modules
tabNetwork
module checkbox and confirm with Ok
Upvotes: 3