Hello,
I've got QThread sub-classed with run() re-implemented thus:
where doJob() is a func that contains stuff to be done. The doJob() func gets called as excpected but when ending the thread I get a crash that points to the timer->stop(). Commenting that out the crash points at the delete timer; commenting that out, the crash points to run()s end brace.Code:
void Logger::run() { timer->setInterval(updateIntervalSeconds*1000); connect(timer, SIGNAL(timeout()), this, SLOT(doJob())); timer->start(); exec(); timer->stop(); delete timer; return; }
I get a Qt message QThread object destroyed while thread is still running, but I call the quit() func before deleting the object. what's going on?
thanks
K

