我把一段比较耗时的程序放在线程的slot中,通过主线程发送信号触发,为什么还会让界面无法响应。
文档里面有
Like other objects, QThread objects live in the thread where the object was created -- not in the thread that is created when QThread::run() is called. It is generally unsafe to provide slots in your QThread subclass, unless you protect the member variables with a mutex.
是不是线程里面最好不要有slot?