Qt request never trigger the finished() signal

Posted by user63898 on Stack Overflow See other posts from Stack Overflow or by user63898
Published on 2012-10-20T16:58:00Z Indexed on 2012/10/20 17:00 UTC
Read the original article Hit count: 157

Filed under:
|

i have something realy strange i have this code :

m_url.setUrl("www.cnn.com");
     QNetworkRequest request;
     request.setRawHeader("User-Agent", USER_AGENT.toUtf8());
     request.setRawHeader("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
     request.setRawHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
     request.setRawHeader("Accept-Language", "en-us,en;q=0.5");
     request.setRawHeader("Connection", "Keep-Alive");
     request.setUrl(m_url);



    reply = qnam.get(request); //QNetworkAccessManager qnam member of the class;

    connect(reply, SIGNAL(finished()),
            this, SLOT(httpFinished()));

the httpFinished() function that is under private slots: never triggered , why ?

© Stack Overflow or respective owner

Related posts about c++

Related posts about qt