View Full Version : Plotcurveitem pyqtgrapgh hover action

19th May 2016, 14:00
I want to highlight the graph that is drawn in plotcurve item on hovering.Here is the code

class PlotCurveItem(pg.PlotCurveItem):
def __init__(self, *args, **kargs):

def hoverMoveEvent(self, event):
if self.path.contains(ev.pos()):
"""then highlight"""

But "contains" is getting satisfied even if I hover inside the plotCurve item.I want it to highlight only when i hover over the graph created by plotcurveitem. Is there any other solutions instead of using contains