this->thread() 对象当前所在为UI线程
QThread::currentThread() 当前函数运行所在线程
if (this->thread() == QThread::currentThread()){
// 判断是否在同一个线程
}
Qt 判断是否在同一个线程
最新推荐文章于 2023-09-28 23:45:52 发布
this->thread() 对象当前所在为UI线程
QThread::currentThread() 当前函数运行所在线程
if (this->thread() == QThread::currentThread()){
// 判断是否在同一个线程
}