Thanks everyone for help.
For me solution is using QGraphicsSimpleTextItem and translate by value calculate by QFontMetricsF::tightBoundingRect / QFontMetricsF::boundingRect.
[image: 57d4ed18-460c-483f-afd1-40bef7f8771b.png]
Now yellow is QGraphicsSimpleTextItem::boundingRect.
@AdrianCruz
hi
Super :)
just as a note
To avoid getting possible NULLs in the list, i would suggest doing
QGraphicsItem *item = qgraphicsitem_cast<QGraphicsItem*>(text);
if (item)
list.push_back(item);
You can take a look at the "Chip" class in the 40000 chips example. Or the classes in the Drag Drop Robot example. They don't use text, but the principles are the same.