Hello all,
I have a plot with a single graph where I am adding a vertical line via a right mouse click.
I create a QCPItemStraightLine via a pointer and the "new" keyword while passing "this" as the parent.
The pointer is also added to a QList collecting all vertical lines added in this way.
When I want to delete one of these vertical lines I am calling removeItem() and removeAt() for the QList. I have seen in the documentation where it says to call removeItem() instead of deleting manually.
The problem is the vertical line continues to be displayed in the graph.
Is there something else I have to do to remove this?
I see the documentation talks about this item being automatically "registered" with the qcustomplot. Maybe I have to do something to "unregister" the item?