I have created a `QCustomPlot`

line graphs containing multiple `QCPAxisRect`

which share a common margin (makes them aligned) and aligned vertically.

I have a requirement that I need to draw a vertical line across all the line graphs (i.e. the axis rects) when the mouse hovers hover any one of them i.e. a vertical line will move horizontally based on the mouse's x-position. I have overriden the `mouseMoveEvent`

for `QCustomPlot`

and looping through all the `QAxisRect`

and adding a `QItemLine`

with appropriate x,y position. Now, the problem is that I only get the line for the first axis rect, not on any subsequent graphs. How do I make it appear on top of** all **the rects and not just the first one?

Also, I have to show the a axis value beside the line as a text label. For this, how do I get the x-axis value from x-coordinate ?