Thanks for your help !
Actually what I am trying to do is that I want that Text should be displayed with image on QGraphicScene.......
I am working on a project that show images with label on them.
QGraphicsTextItem *item = new QGraphicsTextItem(text->label()); //text->label() function return the label for that image
Actually a for loop is run in which every time new label is got from text->label() and displayed with that particular image.
It is difficult to make understandable but in layman language I'll said that if there are 10 images then 10 different label will displayed
corresponding to each image.
Then I use the following above code and map ot to Scene. After that I add it to group as follow:
|
Source code
|
1
|
QGraphicsItem *show=group->addToGroup(item);
|
This value is return to QGraphicsItem and after that add to QGraphicScene
|
Source code
|
1
2
|
QGraphicsScene *scene;
scene->addItem(show);
|
Text are displaying properly but not according to desired location....
Thanks