[Qt-interest] How can I implement a LineEdit which can scroll to show some text automatically?
Kermit Mei
kermit.mei at gmail.com
Sat Apr 25 18:15:41 CEST 2009
On Sat, 2009-04-25 at 14:50 +0530, Raja Sekharan wrote:
> I am assuming you want want a linedit that automatically scrolls text
> like a news flash.
>
> You would do that using a timer - the timer should call a function that
> removes one character from the beginning and adds one character in the
> end from the complete text.
>
> Raj
Yes, Raj, I use timerStart() method of QLineEdit, but I don't removes
the character, I just use setCursorPosition(). If I resize the
LineEdit, then the method removing the characters will become tedious.
But there's also a little problem for me. When I open the LineEdit, the
LineEdit will stop for a little time, then it can move. I think it may
wait for the cursor move the the last position of the LineEdit show
currently.
>
> On Sat, 2009-04-25 at 09:22 +0800, Kermit Mei wrote:
> > Hello, I want to implement a LineEdit to show some text. The text is
> > always more then one line, and the LineEdit should show all the text by
> > a scroll mode. I mean, the text should be scrolling in the LineEdit
> > automatically like playing a movie.
> >
> > How can I do it?
> >
> > Thanks.
> >
> > Kermit
More information about the Qt-interest-old
mailing list