Suppose in a single threaded application, I have created a server and connected a slot with new connection arrival signal like following,
connect(mTcpServer, SIGNAL(newConnection()), this, SLOT(newClientConnected()));
and after this line I went into a huge loop where I do some calculations. So my single thread which is the main thread is busy in a loop and now a new connection arrives.
So my questions are,
1) In which thread the new slot will be executed? I ask this because
main thread is already executing some code in a loop.
2) In which thread the event loop is maintained? Because certainly my single
thread is executing some code in a loop and is not maintaining the event loop.
I'm a newbie in QT :(