[Qt-interest] Immortal Programs!

Gary Coulbourne gcoulbourne at mediaguide.com
Thu Jul 2 00:10:23 CEST 2009


I've run across something curious... I have a program that establishes an HTTP
connection to a backend to grab huge pieces of XML for processing in a
streaming manner.  I'm using a QNetworkManager and keeping multiple requests
in-flight at a time.  The event loop is running throughout and the gui is
responsive the whole time.

Often, it will take a long time for all of the XML to be sent.  Frequently, I
will want to exit the application before that has happened.  I had expected
the application to quit when the last window was closed (which is the behavior
is has if it is not processing anything), what happens, though, is that I have
to cntrl-C the application in the terminal window where it is running, because
the XML processing continues in the background spitting out qDebug() logging
data to my terminal as it chews through the text coming from the network.

I cannot find anything in the documentation to explain this behaviour, and was
wondering if anyone else had some suggestions?

Thanks,
Gary



More information about the Qt-interest-old mailing list