Dear everybody!
now I'm using socket in thread!
in the thread:
//////////////////
if (!tcpSocket.setSocketDescriptor(socketDescriptor))
{
emit error(tcpSocket.error());
return;
}
tcpSocket.waitForReadyRead();
QByteArray Mark = tcpSocket.read(10);
//////////////////
when the program was ran the error is reported!
cannot send events to objects owned by a different thread!
when I remove the "tcpSocket.waitForReadyRead();",the error isn't appear,but I cannot get any data form socket!
Bookmarks