如果已经subclass QThread并且override QThread::run了,就不要再用signal/slot去做跨线程调用了。QThread::run中运行了一个消息循环,override后不做特殊处理的话,QThread就无法响应signal了。
“
In that example, the thread will exit after the run function has returned. There will not be any event loop running in the thread unless you call exec().
”
【 在 zhanghaoX 的大作中提到: 】
: 还有这句,new slots should not be implemented directly into a subclassed thread。
:
: 啥意思? 着重点是在directly? 是说要注意同步问题?
: ...................
--
FROM 123.123.134.*