[Qt-interest] Problems with QList and QNetworkAccessManager , kinds of `multi thread'
Thiago Macieira
thiago at kde.org
Wed Mar 17 18:13:31 CET 2010
Em Quarta-feira 17 Março 2010, às 14:16:11, Aaron Lewis escreveu:
> Hi,
> I was writting a browser, try to do a `multi thread' access.
>
> Sample Code:
>
> QList<QNetworkAccessManager> list;
>
> for(int i=0;i<5;i++){
> QNetworkAccessManager *manager = new QNetworkAccessManager;
> list << manager;
> // parse http request
> // connect finish signal to signal handler
> // means i want to put it in background , so user interface will
> kept working
> delete manager;
> }
>
>
> But these doesn't work , i can't use operator << like that.
Besides the solution to your problem here, I recommend:
1) don't create more than one QNetworkAccessManager
2) don't use threads
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100317/36933b20/attachment.bin
More information about the Qt-interest-old
mailing list