MCPcopy
hub / github.com/PyQt5/PyQt / closeAnimation

Method closeAnimation

Demo/WindowNotify.py:124–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

122 # QTimer.singleShot(self._timeout, self.closeAnimation)
123
124 def closeAnimation(self):
125 print("closeAnimation hasFocus", self.hasFocus())
126 # 关闭动画
127 if self.hasFocus():
128 # 如果弹出后倒计时5秒后还有焦点存在则失去焦点后需要主动触发关闭
129 self._timeouted = True
130 return # 如果有焦点则不关闭
131 self.isShow = False
132 self.animation.stop()
133 self.animation.setStartValue(self.pos())
134 self.animation.setEndValue(self._startPos)
135 self.animation.start()
136
137 def onAnimationEnd(self):
138 # 动画结束

Callers

nothing calls this directly

Calls 2

stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected