Below pseudo code(original code is complex, so I just post the pseudo code here) partially finish what I need.

Qt Code:
  1. class GroupItem(QAbstractGraphicsShapeItem):
  2. def __init__(...):
  3. self._children = []
  4. self._children.append(A)
  5. self._children.append(B)
To copy to clipboard, switch view to plain text mode 


With code above, I can successfully group A and B together, both A and B are QAbstractGraphicsShapeItem.
1. I can group them together, when I drag A, B will also move too. This is good, since sometimes I need to move them together.
2. After I clicked A, then drag A, only A will move, B will stay. This is also good, since sometimes I need to move A and B separately.
This is already good in my current code, but I have a question here, is this the default action of QAbstractGraphicsShapeItem that after I clicked A, I can control A and B separately, otherwise I control A and B together?

Even above 2 actions are good, I still need more which I don't know how to solve it.
In both A class and B class, there are mousePress, mouseMove, mouseRelease, itemChange.
I know the reason I can control A and B together is because of itemChange. When I drag A, MousePress, mouseMove, mouseRelease, itemChange of A are called, only itemChange of B is called. Is there a way I can also get MouseRelease of B called when I drag A, in MouseRelease I can summarize all the change here. (move function MouseRelease to function itemChange is not an option, since it's required that MouseRelease should be sent out only once for one full dragging action which includes press, move, release )