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