QRunnable trying to abort a task
问题 Is it possible to abort a QRunnable task? I can't find any way to do it even in the documentation. Thanks a lot 回答1: No, you cannot abort a QRunnable task. The only way to dirty-abort a thread in Qt is through QThread::terminate() (which is discouraged). QThreadPool uses QThread behind-the-scenes to run QRunnable tasks, but it doesn't provide a way for developers to call QThread::terminate() . Therefore, QRunnable cannot be aborted. I recommend redesigning your application -- refer to