(self, title="", content="", timeout=5000)
| 101 | self._timer = QTimer(self, timeout=self.closeAnimation) |
| 102 | |
| 103 | def show(self, title="", content="", timeout=5000): |
| 104 | self._timer.stop() # 停止定时器,防止第二个弹出窗弹出时之前的定时器出问题 |
| 105 | self.hide() # 先隐藏 |
| 106 | self.move(self._startPos) # 初始化位置到右下角 |
| 107 | super(WindowNotify, self).show() |
| 108 | self.setTitle(title).setContent(content).setTimeout(timeout) |
| 109 | return self |
| 110 | |
| 111 | def showAnimation(self): |
| 112 | print("showAnimation isShow = True") |
no test coverage detected