Hi
I tried to restart a thread (after exit them), but when I push the restart button the program crashed and the debuger showed the following message: "QObject: Cannot create children for a parent that is in a different thread.(Parent is QTcpSocket(0x811a274), parent's thread is QThread(0x81367c0), current thread is OptimizationThread(0x81a6d90)"
What could be the problem?
The code to restart is this:
Code:
pause = false; if (!isRunning()) { } else { condition.wakeOne(); quit(); if (!isRunning()) { } else { qDebug()<<"Error"; } }
I use Qt 4.4.3 and ubuntu