Qt线程测试
Qt线程测试
#include "vcmainthread.h" VCMainThread::VCMainThread(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); videoThread1 = new VideoThread(); connect(videoThread1, SIGNAL(DisplaySignal(QString)), this, SLOT(DisplayLog(QString))); } void VCMainThread::DisplayLog(QString str) { ui.logDisplay->setText(str); } void VCMainThread::OnStartVideoButtonClick() { if (videoThread1 != nullptr) { videoThread1->start(); } }
###########
QQ 3087438119