C++ (Qt)class Worker : public QObject{ Q_OBJECT public slots: void doWork() { /''' … */ }}; /''' … */QThread thread;Worker worker;connect(obj, SIGNAL (workReady()), &worker, SLOT (doWork()));worker.moveToThread(&thread);thread.start();