修改线程的退出,修改ins2 time显示到界面

This commit is contained in:
hm
2020-12-14 11:09:41 +08:00
parent daf8e618bb
commit 543dd019f9
10 changed files with 368 additions and 346 deletions
+6 -2
View File
@@ -44,7 +44,11 @@ void ParameterProcess::stop()
if(thread->isRunning())
{
running_flag = false;
qDebug() << "thread stop" << running_flag;
qDebug() << "thread stop"
<< QThread::currentThreadId()
<< QThread::currentThread()
<< "running state:"
<< running_flag;
}
else
{
@@ -72,7 +76,7 @@ void ParameterProcess::process()//线程函数
//退出线程
disconnect(thread, nullptr, nullptr, nullptr);
thread->quit();
thread->wait();//等待结束
//thread->wait();//等待结束
thread->deleteLater();
thread = nullptr;
}