qt 多线程报错Widgets must be created in the GUI thread
我在QMainWindow主窗口中创建了一个线程类mythread:QThread和一个子窗口,在run函数里监控时间,时间一到,emit信号到主窗口,显示子窗口,调试发现在主线程中,能接收到信号,但是当执行子窗口的show操作的时候,系统弹出runtimeerror错误并终止程序,Application output中显示ASSERT failure in QWidget: "Widgets must be created in the GUI thread.",请问如果我想实现这个功能,我应该怎么修改。