QCustomPlot Discussion and Comments

Attach text to moving cursorReturn to overview


I created a cursor that can be moved via the mouseRelease event to different positions on the x-Axis. Now I want to add a text that is displayed on the top end of the cursor(lineItem) that will give the current values at the cursor position. How can I attach the text to the position and how will the text move with the cursor? I read about anchor but don't quite get it.
Thanks in advance!

Hi, have a look at the simple item demo in the plot examples. It uses parenting (attaching "positions" to "anchors") to connect a line to a text (you want it the other way around, but the principle is the same). It's also explained in the item demo here on the website.

Write here if something is still unclear.