MCPcopy Create free account
hub / github.com/PyQt5/PyQt / doCountDown

Method doCountDown

QMessageBox/CountDownClose.py:39–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
51if __name__ == '__main__':

Callers

nothing calls this directly

Calls 2

setTextMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected