PDA

View Full Version : Moving parent item



barisatamer
5th February 2011, 22:50
QGraphicsItem::ItemIsMovable

" If the item has children, all children are also moved. " says the documentation.

I have a child item and parent item that are movable.
When I move the parent, child item also moves. But when I move the child, parent doesn't move.

I tried with reimplementing mouseMoveEvent of child item, it works, but when I select multiple items, it only moves the child (and its parent) under the mouse.

How can this child item move its parent item?

Is there any way to move the parent item ?

helloworld
6th February 2011, 10:49
QGraphicsItemGroup could be what you are looking for. It lets you create a group of items that can be treated as one.