QThread::terminate() states that it is discouraged to terminate a thread by calling this function. In my program, I need to terminate a thread before it finishes execution. The thread is performing some heavy computation and I want the user to have control to stop calculation. How can I do that instead of calling QThread::terminate()?
Thanks for your time.