MCPcopy Create free account
hub / github.com/PyQt5/PyQtClient / leaveEvent

Method leaveEvent

Widgets/Buttons/RotateButton.py:93–104  ·  view source on GitHub ↗

鼠标离开事件

(self, _)

Source from the content-addressed store, hash-verified

91 self._animation.start()
92
93 def leaveEvent(self, _):
94 """鼠标离开事件"""
95 # 取消阴影
96 self.setGraphicsEffect(None)
97
98 # 旋转动画
99 self._animation.stop()
100 cv = self._animation.currentValue() or self.ENDVALUE
101 self._animation.setDuration(int(cv / self.ENDVALUE * self.DURATION))
102 self._animation.setStartValue(cv)
103 self._animation.setEndValue(self.STARTVALUE)
104 self._animation.start()
105
106 def setPixmap(self, path):
107 if not os.path.exists(path):

Callers

nothing calls this directly

Calls 2

stopMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected