#pragma once #include #include class WorkerThread : public QObject { Q_OBJECT public: WorkerThread(QObject *parent=nullptr); ~WorkerThread(); signals: void resultReady(int); public slots: void doWork(std::function fun, void * parameter); };