修改线程的退出,修改ins2 time显示到界面
This commit is contained in:
@@ -45,7 +45,11 @@ void commandprocess::stop()
|
||||
if(thread->isRunning())
|
||||
{
|
||||
running_flag = false;
|
||||
qDebug() << "thread stop" << running_flag;
|
||||
qDebug() << "thread stop"
|
||||
<< QThread::currentThreadId()
|
||||
<< QThread::currentThread()
|
||||
<< "running state:"
|
||||
<< running_flag;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -73,7 +77,7 @@ void commandprocess::process()//线程函数
|
||||
}
|
||||
//退出线程
|
||||
thread->quit();
|
||||
thread->wait(200);//等待结束
|
||||
//thread->wait(200);//等待结束
|
||||
thread->deleteLater();
|
||||
thread = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user