MCPcopy Create free account
hub / github.com/PyQt5/PyQt / handleTimeout

Method handleTimeout

QtChart/DynamicSpline.py:59–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57 self.timer.start()
58
59 def handleTimeout(self):
60 x = self.plotArea().width() / self.axisX.tickCount()
61 y = (self.axisX.max() - self.axisX.min()) / self.axisX.tickCount()
62 self.m_x += y
63 # 在PyQt5.11.3及以上版本中,QRandomGenerator.global()被重命名为global_()
64 self.m_y = QRandomGenerator.global_().bounded(5) - 2.5
65 self.series.append(self.m_x, self.m_y)
66 self.scroll(x, 0)
67 if self.m_x >= 100:
68 self.timer.stop()
69
70
71if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

widthMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected