PDA

View Full Version : How to make group Of QGraphicsItem ..



ashishsaryar
4th February 2008, 13:44
Hi to all,
i want to make group of selected item how it will be possible .
I want to make group when i move one graphicsitem and it will come to another graphics item ..


Thanks

jpn
4th February 2008, 14:02
See QGraphicsItemGroup.

ashishsaryar
4th February 2008, 14:12
I have seen QGraphicsItemGroup .... but i want to make group when one graphicsitem comes near to other (only on boundries).

jpn
4th February 2008, 14:14
What did you try so far? One option is to reimplement QGraphicsItem::itemChange(), detect the situation and form the group. Notice also QGraphicsItem::collidingItems().