Hi,
I need to draw a rotated text as part of a QPainterPath to be drawn in a QGraphicsScene (I use a custom subclass of QGraphicsItem).
I can draw the text with QPainterPath::addText(), but it accepts only the starting point.
Really I have 2 problems:
1) I need the text to stay inside a specified rectangle
2) the rectangle may be rotated

For 1) I thought about this solution: a while() loop which reduces font size until QFontMetricsF::boundingRect() is small enough to fit in the requested rectangle.
Is there a better way?

For 2) I don't have a solution at the moment.

I don't know how to use the QTextLayout and QTextLine classes, may them help me in some way?

Any help/suggestion is really appreciated!

Thanks,
Alessandro