Reputation: 10621
My VS2010 can only #include <Qt/qtcpserver.h>
but can't #include <QTcpServer>
.
Qt assistant suggested <QTcpServer>
be included to apply TCP server but it seems this header cannot be found by my VS2010, but it can find <Qt/qtcpserver.h>
and these two headers seems to be the same.
Are they the same and why can't I find <QTcpServer>
?
PS:
I'm currently using Qt4 plugin with VS2010.
Here's a snapshot of my VS project files:
No .pro
file there.
Upvotes: 2
Views: 2616
Reputation: 206689
You need to have
QT += network
in your .pro
file to get the Qt networking headers and library correctly set up for your project.
For the Qt Visual Studio Add-in, look at the second tab of the project settings dialog box.
Upvotes: 6
Reputation: 51840
In your Qt project settings, add the network module. A guide with pictures:
http://doc.qt.digia.com/vs-add-in/vs-addin-managing-projects.html
Upvotes: 1