(self)
| 37 | print('是否自动关闭', auto) |
| 38 | |
| 39 | def doCountDown(self): |
| 40 | self.closeBtn.setText('关闭(%s)' % self._count) |
| 41 | self._count -= 1 |
| 42 | if self._count <= 0: |
| 43 | self.closeBtn.setText('关闭') |
| 44 | self.closeBtn.setEnabled(True) |
| 45 | self._timer.stop() |
| 46 | if self._auto: # 自动关闭 |
| 47 | self.accept() |
| 48 | self.close() |
| 49 | |
| 50 | |
| 51 | if __name__ == '__main__': |