Qt中弹出错误:ASSERT: qApp && App->thread() == QThread::currentThread()

来源:互联网 发布:手机电视遥控器软件 编辑:程序博客网 时间:2024/05/16 09:26

原因

Although QObject is reentrant, the GUI classes, notably QWidget and all its subclasses, are not reentrant. They can only be used from the main thread.

 

子线程中读取Qt的UI属性可以,修改不可以!

可在子线程中使用信号或事件传给主线程去修改Qt的UI

 

原始链接

http://www.qtcn.org/bbs/simple/?t26899.html

原创粉丝点击