(self)
| 93 | self.circleColor = QColor(156, 217, 249) |
| 94 | |
| 95 | def initAnimation(self): |
| 96 | # 属性动画 |
| 97 | if not hasattr(self, "xanimation"): |
| 98 | self.xanimation = QPropertyAnimation( |
| 99 | self, b"x", self, easingCurve=QEasingCurve.InOutSine |
| 100 | ) |
| 101 | self.xanimation.valueChanged.connect(self.valueChanged.emit) |
| 102 | self.yanimation = QPropertyAnimation( |
| 103 | self, b"y", self, easingCurve=QEasingCurve.InOutSine |
| 104 | ) |
| 105 | self.yanimation.valueChanged.connect(self.valueChanged.emit) |
| 106 | self.yanimation.finished.connect(self.updateAnimation) |
| 107 | self.updateAnimation() |
| 108 | |
| 109 | def updateAnimation(self): |
| 110 | self.xanimation.stop() |
no test coverage detected