PDA

View Full Version : How to make the text scroll



prakashmaiya
13th August 2015, 04:08
Dear Experts,

Kindly could you help me out to make the text scrolling. May be text have the 20 characters, instead giving so much width to display (since there is a size constraints), I just wanted to give only less width where only can show some 10 characters at a time, but rest of the characters should scroll.

I would really appreciated your help and suggestions on this. Thanks in advance :)

Regards,
Maiya

Am using Linux os and 4.7.2 Qt version.

prasad_N
13th August 2015, 05:03
what do you mean by scrolling text /

are you using QTextEdit or QLineEdit or something else ?

If you are using either of the above scrolling is a default behavior.

Thanks.

prakashmaiya
13th August 2015, 05:53
I Mean -- Imagine a label with a fixed size containing a single-line text string which is too wide to fit inside the label. I need to design a widget which shows the complete text string by scrolling the text string from right to left - similar to a horizontal moving banner.

Will this QLineEdit, and QTextEdit help me to do it?

Regards,
Maiya

prasad_N
13th August 2015, 06:28
Here I have seen similar posts, may be they could help you well.

http://www.qtcentre.org/threads/30051-Smooth-Text-Scrolling

http://www.qtcentre.org/threads/45567-PyQt4-Smooth-text-scrolling-in-QLabel-%28again%29

BTW: think about display short description on QLabel & display complete text as ToolTip.

Malisha100ka
26th August 2015, 19:39
Thanks this helped me a lot!