I have a GraphicsLayoutWidget embedded in a QT application. This Widget contains an image item and histogram as well as some ROI items. I would like to be able to obtain the x,y positions and image value under the mouse cursor as I hover over the image inside the widget. It's not immediately obvious to me how to do this. 2 things I've tried is subclassing graphicslayoutwidget and sigSceneMouseMoved. Sofar not successful with either one of these. I'm sure I'm missing something obvious. Any suggestions?
import pyqtgraph as pgimport numpy as nppg.mkQApp()w = pg.GraphicsLayoutWidget()w.show()vb = w.addViewBox()img = pg.ImageItem(np.random.normal(size=(100,100)))vb.addItem(img)def mouseMoved(pos):print "Image position:", img.mapFromScene(pos)w.scene().sigMouseMoved.connect(mouseMoved)