title: PyQt mousePressEvent - get object that was clicked on?
body: <p>I'm using PyQt and PyQtGraph to build a relatively simple plotting UI. As part of this I have a graphicsview (pyqtgraph's graphicslayoutwidget) that has PlotItems dynamically added to it by the user. </p>
  
  <p>What I'm trying to achieve is allowing the user to select a PlotItem by double clicking on it. </p>
  
  <p>It's simple enough to get if the user has double clicked somewhere within the widget window, but I can't seem to figure out how to return what was clicked on. </p>
  
  <p>Most of my search results have come up with trying to reimplement mousePressEvent for certain pushbuttons. I've read a bit about event filters, but I'm not sure if that's the necessary solution here. </p>
  
  <p>I'm not sure what other information might be useful for helping answer this question, so if it's unclear what I'm asking let me know so I can clarify.</p>
  
  <p>Edit:</p>
  
  <p>Duplicate of this:</p>
  
  <p><a href="https://stackoverflow.com/questions/19428251/pyqtgraph-when-i-click-on-a-plotitem-how-do-i-know-which-item-has-been-clicked">pyqtgraph: When I click on a PlotItem how do I know which item has been clicked</a></p>