I'm trying to make a plot with movable control points usig QGraphicsView
, QGraphicsScene
&& QGraphicsItemGroup
. The problem I've encountered is I can't find any method of removing/deleting the item.
My thoughts are following:
I'm going to have a QGraphicsView, on it are going to be movable interpolation points and under it a plot going through those points is going to be drawn.
To achieve this I'm thinking of using two(or more) QGraphicsItemGroups
.
- one for interpolation points, which cannot be removed since i need to drag them around
- one for the actual plot showing under them
To do that, I'm going to add the Lines into the first group and show them. But there is going to be a lot of redrawing and the thing I don't know right now is HOW TO PROPERLY REMOVE ITEM FROM QGraphicsView
/QGraphicsScene
/QGraphicsItemGroup
so it won't be showing anymore. Please bear in mind that i need to just remove/replace one group of items without removing all the others.
I'm going through the documentation and tutorials but can't find anything useful.