If you get QXmlStreamReader::PrematureEndOfDocumentError just run QEventLoop and wait more data from socket, when you get data then exit from local QEventLoop and return to while(). If you don't get new data or user abort parsing just quit from QEventLoop with exit code like "QEventLoop::exit(1)", then compare returned value "int errcode = eventLoop.exec();" and just interrupt while().

So you can't resume parsing without QEventLoop, becouse data not arrived.