///构造函数中
QObject* auto_focus_worker;
QThread* auto_focus_thread;
auto_focus_worker= new QObject,
auto_focus_thread = new QThread;
auto_focus_worker->moveToThread(auto_focus_thread);
connect(auto_focus_thread, &QThread::started, auto_focus_worker, [this]() {
///........
///为什么要定义一个东西,比如链表,因为增加安全性,不然子线程和主线程同时访问一个东西
cv::Mat mat = image_auto_focus_list_.front();
image_auto_focus_list_.pop_front();
// auto_focus_thread->quit();
} );
auto_focus_thread->start();