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

原因

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

你可能感兴趣的:(thread,UI,qt)