thanks for reply

Originally Posted by
high_flyer
But it looks to me you are trying to force using threads where they are not really needed, and that a proper design would simplify the whole thing dramatically.
Yes you are right, i am trying to force using thread but it is needed at the same time, because of the same reason you mentioned, to keep my GUI responsive, without having threads my GUI will just go unresponsive.

Originally Posted by
high_flyer
On way is to get rid of the wait, and have a "thread starter" slot connected to the finished() signal of the threads, and then you can start the next.
i think you meant by:
cObj->connect(&thread,SIGNAL(started()),SLOT(show()));
thread.connect(&thread,SIGNAL(finished()),&thread,SLOT(start()));
thread.start();
//thread.wait(); //COMMENTED THIS OUT
cObj->connect(&thread,SIGNAL(started()),SLOT(show()));
thread.connect(&thread,SIGNAL(finished()),&thread,SLOT(start()));
thread.start();
//thread.wait(); //COMMENTED THIS OUT
To copy to clipboard, switch view to plain text mode
but obviously it wont work either because none of thread is waiting to finish...and if i uncomment above thread.wait() then execution of thread never finishes to start next one, i mean finished() signal is never emitted from &thread obj.
Bookmarks