Dear All!
Qt Code:
  1. QGraphicsTextItem *scrItem = new QGraphicsTextItem("WELCOME MY SIR");
  2. scrItem->setDocument(txt->document());
  3. QDir::setCurrent(QDir::currentPath ()+"/media");
  4.  
  5. QPixmap pico("rose.jpg");
  6. pico=pico.scaled ( t.Font.pointSize(),t.Font.pointSize(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ));
  7.  
  8. QGraphicsItem *ship=new MyPixmapItem(pico,0,1);
  9.  
  10.  
  11. scrItem->setFont(t.Font);
  12.  
  13. gpItem->addToGroup (ship);
  14. gpItem->addToGroup (scrItem);
  15. gpItem->addToGroup (scrItem1);
  16.  
  17.  
  18. QPointF m(scrItem->mapToItem (ship,QPointF(ship->boundingRect().width(),0)));
  19. qDebug()<<"Before\tText Item POS = "<<scrItem->scenePos()<<" Image Item POS = "<<ship->scenePos();
  20.  
  21. scrItem->changeGeometry();
  22. QPointF sf=scrItem->mapFromScene(scrItem->mapToScene(m));
  23. qDebug()<<sf;
  24. qDebug()<<"After\tText Item POS = "<<scrItem->scenePos()<<" Image Item POS = "<<ship->scenePos()<<"\n";
  25. view=new QGraphicsView(scene,btgScrollText);
  26. scene->addItem(gpItem);
  27. animation->setItem(gpItem);
To copy to clipboard, switch view to plain text mode 
I want to put scrItem after ship object. How to map this.