I have found the solution.
Use a QGraphicsItemGroup to contain the text items. Use the group to set coords, scales and rotation. The text items ignores the transformations.
For example:
grp->addToGroup(text);
text->setFont(font);
text->setPos(0,0);
grp->setPos(x,y);
QGraphicsItemGroup *grp = new QGraphicsItemGroup;
QGraphicsTextItem *text = new QGraphicsTextItem("text");
grp->addToGroup(text);
text->setFont(font);
text->setPos(0,0);
text->setFlag(QGraphicsItem::ItemIgnoresTransformations);
grp->setPos(x,y);
To copy to clipboard, switch view to plain text mode
Pay attention that the text item must be added to group before his setting his coordinates, since coordinates of the sub-item are relative to the parent item, BUT when adding the item to the group his coords relative to the scene are preserved.
Hope that helps.
Bookmarks