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

Method resizeEvent

QtChart/LineStack.py:131–141  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

129 self.min_y, self.max_y = axisY.min(), axisY.max()
130
131 def resizeEvent(self, event):
132 super(ChartView, self).resizeEvent(event)
133 # 当窗口大小改变时需要重新计算
134 # 坐标系中左上角顶点
135 self.point_top = self._chart.mapToPosition(
136 QPointF(self.min_x, self.max_y))
137 # 坐标原点坐标
138 self.point_bottom = self._chart.mapToPosition(
139 QPointF(self.min_x, self.min_y))
140 self.step_x = (self.max_x - self.min_x) / \
141 (self._chart.axisX().tickCount() - 1)
142
143 def mouseMoveEvent(self, event):
144 super(ChartView, self).mouseMoveEvent(event)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected