class MyTimer : public QTimer{public slots: void restart() { this->stop; this->start();}}class MyThread: public QThread{signals: void signalRestart();protected: void run() { MyTimer timer; connect(&timer, SIGNAL(timeout()), this, SLOT(procTimer())); connect(this, SIGNAL(signalRestart()), &timer, SLOT(restart())); exec(); }public: void procTimer() { //proc } void restartTimer() { emit signalRestart(); }};