PDA

View Full Version : incorrect QGraphicsItemGroup mouse drag behavior



Gopala Krishna
24th January 2008, 08:52
hi,
I guess this is incorrect behavior of ItemGroup. Let me explain it.
Consider a group with arbitrary number of items. Now whenever any item within group is selected and dragged using mouse, the group remains stationary through out!
I tried to investigate this issue (at least for me this is an issue) and found out that the MouseGrabber item was the child item of group which was mousePressed but the mouse events were being handled by the group (as it calls setHandlesChildEvents(true) )

To work it around now i am using groupChildItem->setAcceptedMouseButtons(0) for each child of group.

I just wanted to know your opinions on this. Is this bug ?

wysota
25th January 2008, 10:05
Why do you think the group shouldn't be stationary? An item group is an entity that groups independent objects, as far as I understand it. If you want the whole group to move, simply select the group when any of its items is selected.