Hi,
Can a QThread call "exec()" on "run()" method and then do some work or "exec()" locks?
I need to call "exec()" because the Thread have a Socket so the events have to be sended to this Thread, but also have to do som work:
Code:
MyThread::run() { if (!m_qSocket.setSocketDescriptor(m_iSocketDescriptor)) { return; } bool bC = connect(&m_qSocket,SIGNAL(readyRead()),this,SLOT(llegirDades())); bool bC2 = connect(&m_qSocket,SIGNAL(disconnected()),this,SLOT(desconexio())); exec(); //Here I need to do some work: ... //more work, ... ... }
Thanks,