[Qt-interest] Troubles with QNetworkAccessManager

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Wed May 11 06:38:16 CEST 2011


> I am guessing it has something to do with the fact that
> QNetworkAccessManager is using asynchronous calls and that the threads that
> are used to make the asynchronous calls are started without QThread?

Which Qt version are you using?

Recently, the trolls have updated QNAM to use threads.

http://labs.qt.nokia.com/2011/04/29/threaded-http-inside-qnetworkaccessmanager/

But thats still not in any released version of Qt (CMIIW). Are you
using QNAM pulled from the repo directly?

>
> I am able to reproduce the problem with this minimal application.
>
> #include <QtCore/QCoreApplication>
> #include <QtNetwork/QNetworkAccessManager>
> #include <QtNetwork/QNetworkRequest>
> #include <QUrl>
>
> int main(int argc, char *argv[])
> {
>     QCoreApplication a(argc, argv);
>     QNetworkAccessManager networkAccessManager;
>     networkAccessManager.get(QNetworkRequest(QUrl("http://www.google.se")));
>     return a.exec();
> }
>
> Have anyone encountered this problem before?

Umm...how does this app show the problem? I don't see any slots
connected to QNAM's signals?

-mandeep

>
> Regards,
>
> Lars Andersson
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>



More information about the Qt-interest-old mailing list