Hi,
i draw text like this:
Code:
drawText ( width()/2, height()/2, "a very long long text" );
How can i make a wordwrap if the text size more as the QWidget size?
Thanks in advance,
Whitefurrows
Printable View
Hi,
i draw text like this:
Code:
drawText ( width()/2, height()/2, "a very long long text" );
How can i make a wordwrap if the text size more as the QWidget size?
Thanks in advance,
Whitefurrows
Use the version of drawText that takes a QTextOption. You can adjust word wrapping there. I think the variant that takes a QRect as its first parameter will work as well.
Code:
drawText(rect(), Qt::AlignCenter, "a very long long text", rect());
That's it, work fine. Thank you!