鼠标离开事件
(self, _)
| 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): |
nothing calls this directly
no test coverage detected