Hi,
I have a console application in which I have reimplemented QCoreApplication. Also, I am creating n(sent as an argument) threads in the following manner
Code:
Thread *t = new Thread(ipAdd, serialNo, noOfSecs, perSec); ++threadCount; connect(t, SIGNAL(finished()), this, SLOT(threadFinished())); connect(t, SIGNAL(finished()), t, SLOT(deleteLater())); t->start();
Here is the slot threadFinished()
Code:
void Application::threadFinished() { --threadCount; if(threadCount == 0){ exit(); } }
The above slot is never called itself and therefore I am not able to exit from the application.
Can someone please help me with this ?
Thanks a lot.