修改线程的退出,修改ins2 time显示到界面
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user