[Qt-interest] How to speed up QChar drawing? Would QStaticText help?

Dmitry Teslenko dteslenko at gmail.com
Fri Sep 30 11:02:40 CEST 2011


Hello!

Here's scenario: lots of QGraphicsItem's each draws single QChar with

painter->drawText(boundingRect(), Qt::AlignCenter, QString(char));

font is always the same.

Then these items are moved using animation. I want to speed up this to
decrease flicker.

I guess QStaticText wouldn't help much. I have single char and there's
no complicated text layout.

What are other ways?

Maybe painting char onto bitmap and then painting bitmaps in
QGraphicsItem::paint?
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



More information about the Qt-interest-old mailing list