Dear all,

I have a question on using a std::stringstream to write to a QTcpSocket, so the contents will be transfered over the network connection.

I have a parent object:
A QObject with a private QTcpSocket attribute called socket.

When socket sends it readyRead() signal to parent, the parent creates a child (a QObject and QRunnable) and starts running its run();

Due to an API implementation, the child produces an std::stringstream output, which is the output of some calculation.

What could I do to take output (or contents of output) from child and give it to the parent, so parent can write its contents to the socket? Or maybe if connect socket->write() with output?

Thank you in advance for any hints!

Cheers