Open ruisebastiao opened 10 years ago
@ruisebastiao did you resolve this? :)
set flag ItemIsMovable = false of the parent before doing resize. for example in mousePressEvent of HandleItem.
In case if any body is wondering how to solve this.
I solved it with something like parent_->parentItem()->setSelected(false);
inside SizeGripItem::HandleItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event)
and resetting it to
parent_->parentItem()->setSelected(true);
inside SizeGripItem::HandleItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
setAcceptHoverEvents(true)
needs to be set.
Hello,
I want to resize the parent QGraphicsItem even when it is selected so i set setFlag(QGraphicsItem::ItemIsSelectable,true) in my main GraphicsItem but when i drag the handler the parent GraphicsItem moves rather then being resized. How can i do the resizing even when the parent GraphicsItem is selected?
Best regards, Rui