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(); } }
###########
标签:Qt,parent,videoThread1,VCMainThread,线程,QString,测试 From: https://www.cnblogs.com/herd/p/17025308.html