QThread: Destroyed while thread is still running解决办法
时间:2015-01-09 19:15:56
收藏:0
阅读:5271
这是由于线程未执行完毕,但提前关闭引起的,常规结束线程的步骤为:
(1)disconect(.........) ; //关闭所有与该进程对象关联的信号和槽
(2)thread->quit();
(3)thread->wait();
(4)thread->deleteLater();
实际测试,只用(2)(3)也行。
评论(0)