[Qt-interest] QStaticText class and multiline text

Constantin Makshin cmakshin at gmail.com
Sun Aug 29 12:17:08 CEST 2010


Hi!

I have an application that works with data shown to the user in the form of flowcharts. Since these flowcharts contain relatively high amount of text and that text doesn't change too often, I thought using QStaticText could improve application's performance (currently text is drawn by QPainter::drawText() and I haven't had any performance-related problems so far). But when I tried to use it, I discovered that QStaticText doesn't [seem to] support text with explicit linebreaks and draws empty squares in place of '\n' characters.

Is this a bug or intended behavior? Are there any plans to add support of multiline text to QStaticText and QPainter::drawStaticText()?

I use Qt 4.7.0 RC1 at the moment, if that's important.



More information about the Qt-interest-old mailing list