QGraphicsScene * scene = new QGraphicsScene;GraphicsItem * item;for (int i = 0; i < MAX; i++){ item = new GraphicsItem; scene->addItem(item);}QList <QGraphicsItem *> :: iterator iter;int value;for (iter = scene->items().begin(); iter != scene->items().end(); iter++){ item = (GraphicsItem*)(*iter); tmp = item->myMember;}
for (iter = scene->items().begin(); iter != scene->items().end(); iter++){ item = (GraphicsItem*)(*iter); tmp = item->myMember;}
for (int i = 0; i < scene->items().size(); i++){ item = (GraphicsItem *)scene->items().at(i); tmp = item->myMember;}
for (iter = scene->items().begin(); iter != scene->items().end(); iter++) qDebug() << "kosjk";
QGraphicsScene * scene = new QGraphicsScene;GraphicsItem * item;for (int i = 0; i < MAX; i++){ item = new GraphicsItem; scene->addItem(item);}[b]QList <QGraphicsItem *> :: iterator iter;[/b]int value;for (iter = scene->items().begin(); iter != scene->items().end(); iter++){ item = (GraphicsItem*)(*iter); tmp = item->myMember;}
assert(dynamic_cast<GraphicsItem*>(*iter)); item = static_cast<GraphicsItem*>(*iter);