[Qt-interest] QNetworkReply *reply = networkManager->get(request); can't get the response in the reply

Meir Yanovich meiry242 at gmail.com
Fri Apr 16 23:46:26 CEST 2010


so what should i do ?

On Sat, Apr 17, 2010 at 12:22 AM, Thiago Macieira <thiago at kde.org> wrote:

> Em Sexta-feira 16. Abril 2010, às 16.12.25, Meir Yanovich escreveu:
> >      QEventLoop loop;
> >      QNetworkReply *reply = networkManager->get(request);
> >      QByteArray data=reply->readAll();
> >      ApiResponse.append(data); <--- the data here is empty
>
> The data is empty there on line 4 because you didn't let the reply process.
> You have to wait for the finished() signal between line 2 (the get() ) and
> the
> attempt at reading.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>  Senior Product Manager - Nokia, Qt Development Frameworks
>      PGP/GPG: 0x6EF45358; fingerprint:
>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100417/2a089289/attachment.html 


More information about the Qt-interest-old mailing list