How do I execute QTcpSocket in a different thread?

前端 未结 4 678
时光说笑
时光说笑 2020-12-18 00:33

How do I execute QTcpSocket functions in a different thread?

4条回答
  •  失恋的感觉
    2020-12-18 01:09

    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

提交回复
热议问题