Q3GroupIterator iter( aGroup, kQ3ShapeTypeGeometry ); CQ3ObjectRef theItem; while ( (theItem = iter.NextObject()).isvalid() ) { // do something with theItem... }