Re: ThreadID does not change
If QThread::currentThreadId() returns the same thread id every time, you're calling it from the same thread every time. How did you setup the code path to this call?
Re: ThreadID does not change
Well I did the following:
I created a timer in the Constructor of my ClientSocket:
Code:
connect(timer, SIGNAL(timeout()), this, SLOT(displayThreadID()));
timer->start(500);
Code:
void ClientSocket::displayThreadID()
{
qDebug
() <<
QThread::currentThreadId;
}
The ID isn't different from the ID in the main Thread, before creating the Thread for the socket.
At the moment my applications starts crashing sometimes because of thread errors... :(