Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Connecting to a web service using Qt5.0.1
oneboy99 last edited by
I am working with microsoft visual studio 2010, c++ project with Qt5.0.1.
I try to connect to remote web service, but I cant find the right connect(..) function to use.
here is my code:
QNetworkAccessManager* m_pNetworkManager = new QNetworkAccessManager();
QString qstrWSPathData = QString::fromWCharArray((LPCTSTR)WSPathData, WSPathData.GetLength());
QNetworkReply* currentReply = m_pNetworkManager->get(request);
SIGNAL ( finished(QNetworkReply*) ),
SLOT ( onResult(QNetworkReply*)) );
I took the connect(..) function from an example over the internet, and i can't compile it right..
Can someone tell me what connect(..) method should I use and what is the header file it exist??
Thank you very much!
Jake007 last edited by
For better readability please wrap your code in "@" tags.
In order to compile Qt with networking, you need to add this to your project file:
@QT += network@
Qt network headers:
Your connect function looks correct.
If it still doesn't works, post error you're getting.