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

Method __init__

QPushButton/FontRotate.py:30–41  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 1

setDurationMethod · 0.80

Tested by

no test coverage detected