Files
GUI/src/action/AsyncAction.cpp

23 lines
316 B
C++
Raw Normal View History

2022-09-29 17:36:55 +08:00
#include "AsyncAction.h"
#include <QThreadPool>
#include <QThread>
#include <QDebug>
AsyncAction::AsyncAction(QObject* aParent)
: QObject(aParent)
, QRunnable()
{
setAutoDelete(false);
}
AsyncAction::~AsyncAction()
{
}
void AsyncAction::execute()
{
QThreadPool::globalInstance()->start(this);
}