I have a question about how to make marquee text smooth (using Qt 4.5.3) on not powerful hardware (Atom N270 + Intel 945GSM). My approach is as follows:
- I draw my text (36px Arial bold) onto a QPixmap (off-screen paint device)
- I set a timer to shift 1px content to left in each 30ms.
- When onTimer event is triggered, I make a selection of the QPixmap and print this part onto the window canvas.
Generally speaking, it moves smoothly. However, the more marquee text I create, the more CPU usage it reaches. When text can fill 50% screen (1920x1680), the CPU usage is about 70-80%. Text animation becomes a bit flickered. If I set timer interval to 50ms or larger, it will be smooth. But text moves too slow.
Is my approach ineffective? Shall I use OpenGL? Any hint is welcome and thanks in advance ^^)