Hi guys
I solved this problem by adding a sleeping time duration in my worker thread preventing it from returning too quick. Then the message box gets shown properly and closed properly.
// member function to do the job
bool MainWindow::waitReply() {
// Here to sleep for a while
QThread::sleep(2);
bool received_valid_reply = false;
while (!m_waitReplyCancelled) {
if (Something Is Received) {
received_valid_reply = true;
return received_valid_reply;
}
}
return received_valid_reply;
}
@Konstantin-Tokarev
For normal web browsing that would be sufficient, yes.
In my case we use a web-driven GUI. If I stop the script that needed too long (due to some network error or whatever) the GUI is missing on the device.