views:

58

answers:

1

I wrote the server site call in Qt, but i haven't get the server response for every server invoking. I have to use the server reply to continue the program flow.

The request is correctly reached to server and server do reply.The server is also on my machine.

Here is the code how i make the server site call; QNetworkAccessManager nam1 = new QNetworkAccessManager(this);
qnetmg=nam1;

    QObject::connect(nam1, SIGNAL(finished(QNetworkReply*)),this,SLOT(finishedGettingMarker(QNetworkReply*)));
    QString strurl="http://localhost:8080/ServerWeb"; 

    QUrl url(strurl);       
    QNetworkRequest preq(url);        
    QNetworkReply* reply = nam1->get(preq);
    qreply=reply;

Inside finisedGettingMarker slot, i have already eliminate for QNetworkReply->error case and i used one global variable for QNetworkAccessManager;"qnetmg" and one global variable for QNetworkReply;"qreply". And also i make qnetmg.disconnect(this,0); and qreply.abort(); inside that slot method.

But the problem is i haven't got the response for every server invoking time. If anyone who know the way to solve it , please reply me.

This situation happened only in Opera.

Thanks in advance.

A: 

Did you ever figure out what the solution to this was?

Vsh3r