i have part of my application that connects through other pc and send data using socket, as i add this to my main project the timeout of socket will block the gui, so my solution is put this part of program to a qthread..
however after i do this
thread = new Mythread();
thread->start();
thread = new Mythread();
thread->start();
To copy to clipboard, switch view to plain text mode
It will not wait for the socket to connect, the thread immediately exited so i add thread->wait()
thread = new Mythread();
thread->start();
thread->wait();//this solve the problem however..
thread = new Mythread();
thread->start();
thread->wait();//this solve the problem however..
To copy to clipboard, switch view to plain text mode
by doing this it will block the GUI, and it is not the thread i want after all..
how to solve this?
Bookmarks