首页| 论坛| 消息
主题:Qt的多线程是不是不能使用QTimer
回帖:zi.h
zu.h
main
zi.cpp
zu.cpp
报 QObject: Cannot create children for a parent that is in a different thread.
(Parent is zi(0x7cf9c0), parent's thread is QThread(0x176f60), current thread is zi(0x7cf9c0)
原程序

浏览大图


浏览大图


浏览大图


浏览大图

附件: a1.rar (5 K) 下载次数:2
下一楼›:QTimer 在线程中不要用 new
QTimer k; 就可以了。run结束后它自动释放。
不过 k 如果关 ..
‹上一楼:wcrqpdb:在run内创建也不行,报QObject: Cannot create children for a parent that is in a dif ..

查看全部回帖(34)
«返回主帖