up_timer = new QTimer;
up_timer->setInterval(1000);
up_timer->start();
up_timer->moveToThread(&up_img_Thread);//定时器移到子线程中
connect(up_timer, SIGNAL(timeout()), this, SLOT(up_model_file()), Qt::DirectConnection);
connect(this, SIGNAL(stop_up_timer()), up_timer, SLOT(stop()));
connect(this,SIGNAL(start_up_timer()),up_timer,SLOT(start()));
up_img_Thread.start();
这样写 定时器的槽函数就是在子线程中执行的