程序示例:
m_socketClient.moveToThread(&m_thread);
connect(&m_thread, SIGNAL(started()), &m_socketClient...mp_clsTcpSocket,SIGNAL(readyRead()),this,SLOT(slot_recvServerData()));
}
二、主线程函数
①构造函数中使用moveToThread
m_socketClient.moveToThread...(&m_thread);
connect(&m_thread, SIGNAL(started()), &m_socketClient, SLOT(slot_initSocket()));...m_thread.start();
connect(this, SIGNAL(signal_sendPicrure(QByteArray)),
&m_socketClient