How do I execute QTcpSocket functions in a different thread?
Put a QMutex lock around all calls, not just on the "different" thread but on all threads. One easy way to do so is via a QMutexLocker
QMutex
QMutexLocker