[Interest] QNetworkAccessManager in a command line, non-eventloop application

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Fri Jan 18 10:02:24 CET 2013


On Fri, Jan 18, 2013 at 7:19 AM, Scott Aron Bloom
<scott.bloom at onshorecs.com> wrote:
> -----Original Message-----
> From: interest-bounces+scott.bloom=onshorecs.com at qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] On Behalf Of Thiago Macieira
> Sent: Thursday, January 17, 2013 5:27 PM
> To: interest at qt-project.org
> Subject: Re: [Interest] QNetworkAccessManager in a command line, non-eventloop application
>
> On sexta-feira, 18 de janeiro de 2013 00.59.13, Scott Aron Bloom wrote:
>> I have a command line application, with no event loop.
>
> We can stop here. QNetworkAccessManager requires an event loop.
>
> But if you're going to block anyway in order to do work, you can use QEventLoop to start the event loop until the request finishes.
> ----------
>
> I don't want to block :)
>
> I would like a background thread and have the request run in there, using the QThreads event loop.

But you still are waiting for this thread to finish work and then quit
the app, correct?

Just curious here, but why don't you want to run the event loop in the
main thread but only run it in a different thread?

-mandeep


>
> Scott
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list