//worker.hclass Worker : public QObject{//...}//main.cppQThread* thread = new QThread;Worker* worker = new Worker();worker->moveToThread(thread);//connect'ыthread->start();
thread->quit();if(thread->wait(1000)){ delete worker; delete thread;}