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

Method onMouseMoved

PyQtGraph/mouseFlow.py:40–43  ·  view source on GitHub ↗
(self, evt)

Source from the content-addressed store, hash-verified

38 self.graphicsView.scene().sigMouseMoved.connect(self.onMouseMoved)
39
40 def onMouseMoved(self, evt):
41 if self.graphicsView.plotItem.vb.mapSceneToView(evt):
42 point = self.graphicsView.plotItem.vb.mapSceneToView(evt)
43 self.label.setHtml("<p style='color:white'>横坐标:{0}</p>".format(point.x()))
44
45
46if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

xMethod · 0.45

Tested by

no test coverage detected