QObject: Do not delete object, 'unnamed', during its event handler!
Qt程序退出时,经常会提示:
Warning: QObject: Do not delete object, 'unnamed', during its event handler!
原因:
程序在delete某些对象时,该对象还在运行中。具体究竟是那些,搜索一下就可以了。
或者应该在编程时给未命名的对象都指定一个名称更直观。
解决办法:
不用delete直接释放空间,而改用QObject::deleteLater()函数来释放空间。
摘自 noodle123的专栏
补充:软件开发 , 其他 ,