OfficeAssistant_Win10/OfficeAssistant_msvc/mythread.cpp

26 lines
437 B
C++

#include "mythread.h"
#include "qminiblink.h"
#include "mainscreen.h"
MyThread::MyThread(MainScreen * mainScreen, QMiniBlink *(*miniblink),QObject *parent)
: QThread(parent)
{
this->mainScreen = mainScreen;
this->miniblink = miniblink;
}
MyThread::~MyThread()
{
}
void MyThread::run() {
*miniblink = new QMiniBlink(mainScreen);
(*miniblink)->init();
}
void MyThread::onstop() {
(*miniblink)->ondestroy();
delete miniblink;
}