class MainWindow(qtw.QMainWindow):
def __init__(self, *args, **kwargs): super(MainWindow, self).__init__(*args, **kwargs)
self.glw = pg.GraphicsLayoutWidget()
self.setCentralWidget(self.glw)
self.glw.scene().sigMouseClicked.connect(self.onClick)
self.show()
#@pyqtSlot()
def onClick(self, evt):
print("glw clicked")
print(evt.scenePos())
if __name__ == "__main__":
app = qtw.QApplication(sys.argv)
win = MainWindow()
app.exec_()
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/6609b0e8-b5f8-4175-9f65-03f0dbbfb89cn%40googlegroups.com.