QTimerを持つスレッドがあります。アプリケーションを再起動せずに、実行間隔を動的に変更できるのが好きです。これは、QThreadrunメソッド内のコードです。
void myThread::run()
{
QTimer timer1;
connect(&timer1, SIGNAL(timeout()),
this,SLOT(fire(),Qt::DirectConnection));
qDebug() << "A::run() worker thread -- currentThread:" << currentThread();
timer1.start(1000);
QThread::exec();;
}