#ifndef GRABBER_H #define GRABBER_H #include #include class Grabber : public QThread { Q_OBJECT public: Grabber(QObject *parent = nullptr) : QThread(parent) {} void run() override; void stop(); private: bool stop_request = false; public slots: void requestStop() { stop_request=true; } signals: void terminated(); }; #endif // GRABBER_H