I'm trying to move a QGraphicsItem with the mouse hover over the parent item.
BaseItem::BaseItem(const QRectF &bounds) : theBounds(bounds), theMousePressed(false) { theLineItem = new LineItem(theBounds, this); setAcceptHoverEvents(true); } and
void BaseItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { QPointF position = mapToScene( event->pos()); theLineItem->setPos( position); } But the item is not moving. Is there any other way to move the item on the scene with mouse move, without using the ItemIsMovable flag, because I want the item to be moved around the parent item, once it's invoked?