Made Item class derive from QGraphicsItemGroup so the group is the Item class instead of being passed around, the group is procesed inside itself and cleared instead of deleted now.