Hello,

I have got the following task, which I cannot achieve since a couple of days:

I have inserten several circles (GraphicsItems) into my scene and after that I would like to change their positions within this scene by dragging them (left mouse button + moving the mouse). I have read almost all information about Drag & Drop, but I still cannot get my items moved through the scene. I have implemented my own class inherited from QGraphicsItem and overriden the functions MousePressEvent() MouseMoveEvent() and MouseReleaseEvent() for this class and after that I also implemented my QGraphicsScene class because I wanted to override the functions DropEvent() and DragEnterEvent(). Actually, I guess that there must be an easier solution without Drag & Drop because the Item is already on the scene, so it is not necessary to drop it there again, right?

The thing I want to do is the following: I create a vector of some points (x and y coordinates) and write the vector elements into the position of generated QGraphicsItems by ( ->setPos() ). During the execution the user should be able to move this items on the scene and thus change the x and y values within the vector elements and the items should remain on the position, where mouse dragging was released, of course.
Help me please to realize this aim.

Thank you

best regards,

Vitali