我在写一个tcp通信的程序,服务器端用的是QTcpSever::incomingConnection(),每来一个客户端就开一个线程,服务器端可往客户端发消息,但客户端往服务器端发消息的时候显示如下错误,请问是怎么回事?
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QTcpSocket(0xd18868), parent's thread is QThread(0xb59378), current thread is serverThread(0xd18858)
Object::connect: No such signal QTcpSocket::readReady() in .\serverthread.cpp:17