ok, next try. Does this give same thread timer warning?
FlashWizard::FlashWizard(...)
{
...
worker = new Worker;
qDebug() << worker->thread();
worker->moveToThread(workerThread);
qDebug() << worker->thread();
qDebug() << worker->m_workerTimer->thread();
//connect(workerThread, SIGNAL(started()), worker, SLOT(start()));
connect(workerThread, SIGNAL(finished()), worker, SLOT(stop()));
connect(worker, SIGNAL(finished()), workerThread, SLOT(quit()));
connect(worker, SIGNAL(finished()), ui->programPage, SLOT(setDone()));
connect(worker, SIGNAL(updateProgress(int)), this, SLOT(updateWritingProgressBar(int)));
workerThread->start();
}
FlashWizard::FlashWizard(...)
{
...
worker = new Worker;
qDebug() << worker->thread();
workerThread = new QThread;
worker->moveToThread(workerThread);
qDebug() << worker->thread();
qDebug() << worker->m_workerTimer->thread();
//connect(workerThread, SIGNAL(started()), worker, SLOT(start()));
connect(workerThread, SIGNAL(finished()), worker, SLOT(stop()));
connect(worker, SIGNAL(finished()), workerThread, SLOT(quit()));
connect(worker, SIGNAL(finished()), ui->programPage, SLOT(setDone()));
connect(worker, SIGNAL(updateProgress(int)), this, SLOT(updateWritingProgressBar(int)));
workerThread->start();
QMetaObject::invokeMethod(worker, "start");
QMetaObject::invokeMethod(worker, "stop");
}
To copy to clipboard, switch view to plain text mode
Bookmarks