(self, *args, **kwargs)
| 28 | LoadingText = "\uf110" |
| 29 | |
| 30 | def __init__(self, *args, **kwargs): |
| 31 | super(PushButtonFont, self).__init__(*args, **kwargs) |
| 32 | self.fontSize = self.font().pointSize() * 2 |
| 33 | self._rotateAnimationStarted = False |
| 34 | self._rotateAnimation = QPropertyAnimation(self) |
| 35 | self._rotateAnimation.setTargetObject(self) |
| 36 | self._rotateAnimation.setStartValue(1) |
| 37 | self._rotateAnimation.setEndValue(12) |
| 38 | self._rotateAnimation.setDuration(1000) |
| 39 | self._rotateAnimation.setLoopCount(-1) # 无限循环 |
| 40 | self._rotateAnimation.valueChanged.connect(self.update) |
| 41 | self.clicked.connect(self._onClick) |
| 42 | |
| 43 | def paintEvent(self, _): |
| 44 | option = QStyleOptionButton() |
nothing calls this directly
no test coverage detected