QThread:Destroyed while thread is still running

发布的release版本总是因为这句日志出现后,崩溃掉

网络查询后有说线程还在run 的while循环中,所以退出的时候,要先停掉run 中的while循环

代码如下

QThread:Destroyed while thread is still running_第1张图片

 需要进行一个

quit();

wait();

你可能感兴趣的:(Qt,Question,qt)