Smooth circular scrolling text in QLabel
I need to scroll the text in a QLabel as in the following example:
ello world h
llo world he
lo world hel
o world hell
I know how to obtain that by manipulating string but I 'd like to get a smooth scrolling (pixel by pixel) .
Is it possible?
I think that could be possible by re-implementing paintEvent().
Can you give me some examples?
Subclass QLabel, rewrite paintEvent()...
Here's Qt's implementation: https://qt.gitorious.org/qt/qt/blobs/4.8/src/gui/widgets/qlabel.cpp#line1078 Actually you're interested only in text label, then look at lines 1098-1146. Then figure out how'd you draw text the way you want.
Not an easy way, really.
I'd first try just working on text (timer at 30fps that would modify Label's text) and see how well it animates. This is simple.