[Qt-interest] QNetworkReply readyRead() doesn't fire

Scott Aron Bloom Scott.Bloom at onshorecs.com
Fri Oct 29 18:01:31 CEST 2010


No problem.. Please reply to the list...

 

From: Alex Ivasyuv [mailto:industral at gmail.com] 
Sent: Friday, October 29, 2010 9:00 AM
To: Scott Aron Bloom
Subject: Re: [Qt-interest] QNetworkReply readyRead() doesn't fire

 

On 10/29/2010 06:56 PM, Scott Aron Bloom wrote: 

Your QNetworkAccessManager goes out of scope, and is killing the
connection...
 
Make the QNAM a member variable of the class
 
Scott


Thank you very much! It's works!




 
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Alex Ivasyuv
Sent: Friday, October 29, 2010 8:51 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] QNetworkReply readyRead() doesn't fire
 
Hi,
 
I can't resolve an issue with simple HTTP request in QT.
 
     void Connection::doSmth() {
       QNetworkAccessManager manager;
 
       QNetworkRequest request;
       request.setUrl(QUrl("http://example.com/" <http://example.com/>
));
 
       this -> reply = manager.get(request);
       connect(reply, SIGNAL(readyRead()), this, SLOT(httpFinished()));
     }
 
     void Connection::httpFinished() {
       cout << 1 << endl;
       //      cout << this -> reply -> readAll().data() << endl;
     }
 
Problem, that httpFinished method doesn't fired at all.
 
What's wrong with my code?
 
Thanks in advance,
 
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
 
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest

 

-- 
Best regards,
Alex Ivasyuv
Senior WebUI Software Engineer
ReelRoles, Inc.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101029/b99559fc/attachment.html 


More information about the Qt-interest-old mailing list