08-01-2013 08:10 AM
My application requires to communicate with a web service. It has to hit at the web service, take the response and fill a container. To access the web service, I am using QNetworkAccessManager. Below is the code snippet:
m_AccessManager = new QNetworkAccessManager(this);
queryUri = "http://someurl";
m_Reply = m_AccessManager->get(request);
connect(m_Reply, SIGNAL(finished()), this, SLOT(onServiceResponseInitial()));
It works like a charm on the Simulator, but it doesn't on the device. QNetworkRequest never signals "finished".
Since I have to use my company's web service, the application is started on "Work" workspace.
Does anyone has any clue what I am missing here? Do I need to configure my device?
Can someone help me here!
08-01-2013 09:42 AM - edited 08-01-2013 09:43 AM
08-01-2013 10:33 AM - edited 08-01-2013 10:37 AM
Try below code for connect finish signal:
connect(m_AccessManager, SIGNAL(finished(QNetworkReply *)), this, SLOT(onServiceResponseInitial(QNetworkReply*)));
08-02-2013 10:17 AM
I'd recommend connecting to QNetworkReply's other signals as well to see if you are getting any data at all, or an error (which you should probably be listening for anyway).