(self, event)
| 58 | self._thread.start() # 启动线程 |
| 59 | |
| 60 | def closeEvent(self, event): |
| 61 | if self._thread.isRunning(): |
| 62 | self._thread.requestInterruption() |
| 63 | self._thread.quit() |
| 64 | self._thread.wait() |
| 65 | # 强制 |
| 66 | # self._thread.terminate() |
| 67 | self._thread.deleteLater() |
| 68 | super(Window, self).closeEvent(event) |
| 69 | |
| 70 | |
| 71 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected