The ThreadWorker class doesn't inherit from QThread. So it has no exec() method.