I’m trying to make a point cloud in which I click on a point and it returns me the position, x, y, z of that point.
And as we can see in the documentation, there is a signal to perform this action: https://pyqtgraph.readthedocs.io/en/latest/graphicsItems/scatterplotitem.html
I therefore wrote the following code, knowing that I already had my point cloud beforehand.
self.position =gl.GLScatterPlotItem(pos=self.pos) self.position.sigClicked.connect(self.clicked()) self.graphtroisd.addItem(self.position)
With an additionnal fonction:
def clicked(self, points): print("points : " + points)
However I run into the following error:
AttributeError: 'GLScatterPlotItem' object has no attribute 'sigClicked'
ScatterPlotItem are different classes altogether. Looks like you’re trying to use a signal from
ScatterPlotItem with a
See the documentation differences here:
Notice that in
GLScatterPlotItem, no such signal exists.