回帖:wcrqpdb:在run内创建也不行,报QObject: Cannot create children for a parent that is in a different thread.
(Parent is readWriteThread(0x21080b80), parent's thread is QThread(0x20fd2530), current thread is readWriteThread(0x21080b80)
(2019-11-07 11:32)
这个报错应该和qtimer无关,QTimer是可以直接实例化在run函数内,不过建议把QTimer包含进一个类中,所有run 中运行的逻辑都在这个类中实现,这样,run函数会很干净,多线程操作也会很有条理性