Dear Friends,
I have prepared Two classes, First class is TestView class, Which is derived from QGraphicView Item, The other class is GraphicsViewManager Which is responsible for managing Items moving, painting , adding to Scene and replacing.

I am sending Item list to the GraphicsViewManager, then I am creating std::vector type in GraphicsViewManager then returning it to the Testview and TestView adding it to the Scene, but I couldnt see them on scene.

Qt Code:
  1. class GraphicsViewManager : public QObject {
  2. Q_OBJECT
  3. public:
  4. GraphicsViewManager();
  5. virtual ~GraphicsViewManager();
  6. std::vector <GraphicItem*> LoadList(std::list <Item> Liste);
  7. GraphicItem *item;
  8. private:
  9. std::vector <GraphicItem*> GItems;
  10. std::vector <GraphicItem*>::iterator Itr;
  11. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void TestView::SetList(std::list <Item> Liste)
  2. {
  3. _Liste = Liste;
  4. Items = Manager->LoadList(_Liste); //GraphicsViewManager *Manager;
  5. for(int i=0;i<Items.size();i++)
  6. m_GraphicsScene->addItem(Items[i]);
  7. }
To copy to clipboard, switch view to plain text mode 



Qt Code:
  1. std::vector <GraphicItem*> GraphicsViewManager::LoadList(std::list <Item> Liste)
  2. {
  3. GItems.clear();
  4.  
  5. for(std::list<Item>::iterator itr=Liste.begin();itr != Liste.end();itr++)
  6. {
  7. QPixmap pixmap(QString().fromUtf8((char*)itr->PicturesUrl.front().data()));
  8. item = new GraphicItem(pixmap);
  9. GItems.push_back(item);
  10. }
  11. SetXYData();
  12. return GItems;
  13. }
To copy to clipboard, switch view to plain text mode 


When I checked the size of Items , size is true but when I added on Scene it doesnt appear.