I have a problem with the instruction removeItem, the customplot object may has two items at same time, one QCPItemLine and a QCPItemText, the line is changing position with a mouse drag event, and each time need be removed, and place in the new position, The text is keep, but I dont know wich item is the line and what is the text, the index is changing once the line is removed and place it again, I cant remove the correct object, How identifiy in what index is the line object?
Also I dont understand the use of overloaded function removeItem(*item), simply why I want to remove and object that recently create and add in same function, this function is nonsense, needs that objects be global, is almost useless.