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

Method leaveEvent

QPushButton/RotateButton.py:112–123  ·  view source on GitHub ↗

鼠标离开事件

(self, _)

Source from the content-addressed store, hash-verified

110 self._animation.start()
111
112 def leaveEvent(self, _):
113 """鼠标离开事件"""
114 # 取消阴影
115 self.setGraphicsEffect(None)
116
117 # 旋转动画
118 self._animation.stop()
119 cv = self._animation.currentValue() or self.ENDVALUE
120 self._animation.setDuration(int(cv / self.ENDVALUE * self.DURATION))
121 self._animation.setStartValue(cv)
122 self._animation.setEndValue(self.STARTVALUE)
123 self._animation.start()
124
125 def setPixmap(self, path):
126 if not os.path.exists(path):

Callers

nothing calls this directly

Calls 3

setDurationMethod · 0.80
stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected