MCPcopy Index your code
hub / github.com/PyQt5/PyQt / setRandomValue

Method setRandomValue

QProgressBar/WaterProgressBar.py:110–113  ·  view source on GitHub ↗

设置随机0-100值,并停止自增

(self)

Source from the content-addressed store, hash-verified

108 self.sender().setIcon(QIcon(pix))
109
110 def setRandomValue(self):
111 """设置随机0-100值,并停止自增"""
112 self._valueTimer.stop()
113 self.bar.setValue(randint(0, 100))
114
115 def updateValue(self):
116 value = self.bar.value() + 1

Callers

nothing calls this directly

Calls 3

randintFunction · 0.85
setValueMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected