QThread: Destroyed while thread is still running
来源:互联网 发布:百叶窗 知乎 编辑:程序博客网 时间:2024/06/06 23:56
在qt开发过程中,win10下运行没有发生此警告,win7下运行发现了此警告。后来查阅资料发现问题如下:
如果一个线程运行完成,就会结束。可很多情况并非这么简单,由于某种特殊原因,当线程还未执行完时,我们就想中止它。
不恰当的中止往往会引起一些未知错误。比如:当关闭主界面的时候,很有可能次线程正在运行,这时,就会出现如题提示。
解决方法:
一、第一种方法
1.qt中运用了很多信号和操,需要将该线程所有的槽disconnect。
使用正常终止该线程的函数方法quit,并且wait等待线程结束。
disconnect(_mergethread);//断开该线程所有的链接_mergethread->quit();
_mergethread->wait();
阅读全文
0 0
- QThread: Destroyed while thread is still running
- QThread: Destroyed while thread is still running
- QThread: Destroyed while thread is still running错误解决方法
- Qt5线程错误:QThread: Destroyed while thread is still running
- QThread 出现QThread: Destroyed while thread is still running QMutex: destroying locked mutex的问题
- $BadTokenException:... is your activity still running?
- [UIPopoverController dealloc] reached while popover is still visible.'
- Cannot close a connection while a transaction is still active.
- [UIPopoverController dealloc] reached while popover is still visible
- How to generate memory dump while application is running.
- JTAG error:can not read register while CPU is running
- 【iOS开发-106】UIPopoverController,[UIPopoverController dealloc] reached while popover is still visible
- WakeLock finalized while still held
- WakeLock finalized while still held
- WakeLock finalized while still held:
- 小胖说事31------iOS 真机编译错误"“XXX”的 iPod" and run "XXX" again, or if "XXX" is still running
- iOS-Restore the connection to "“XXX”的 iPho" and run "XXX" again, or if "XXX" is still running, you c
- Job found still running after platform shutdown.
- ACM基础训练题
- npm install 失败
- 图像处理领域国际国内的顶级期刊和会议
- 页面性能优化
- Storm异常宕掉问题解决
- QThread: Destroyed while thread is still running
- 【PythonDjango后台实例 第七章】Django使用Video.js视频播放插件
- PAT 甲级 1010. Radix (25)
- struts2的核心和工作原理
- SQL server递归查询
- hdu 6215(技巧)
- 华为机试题-约瑟夫问题
- AutoML 学习
- linux ssh免密码登陆