Results 1 to 3 of 3

Thread: Continously Scroll QPlainTextEdit

  1. #1
    Join Date
    Aug 2008
    Location
    Texas, USA
    Posts
    44
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Continously Scroll QPlainTextEdit

    Hey guys,

    I'm just beginning with Qt, obviously thats why i'm in the newbie section.

    I have a QPlainTextEdit widget in my dialog. Occasionally I added text with the appendPlainText() function. After a while the vertical scroll bar shows up. However it does not automatically scroll to show the latest appendPlainText() data.

    What would you suggest to do to make sure the QPlainTextEdit is always scrolled down at the bottom after appending data?

    I noticed there is a scroll(dx, dy) function. However, I was hopping I could do an absolute scroll to the end, and it would scroll all the way to the bottom? Is there a better way?

    Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Continously Scroll QPlainTextEdit

    QPlainTextEdit is supposed to scroll automatically. However, there is a bug in QPlainTextEdit it Qt 4.4, but it has been fixed to upcoming Qt 4.5:
    207241 - AutoScrolling does not seem to work when using the QPlainTextEdit::appendPlainText method
    J-P Nurmi

  3. #3
    Join Date
    Aug 2008
    Location
    Texas, USA
    Posts
    44
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Continously Scroll QPlainTextEdit

    Thank you,

    I would have never picked that up.

Similar Threads

  1. how to add scroll bar on QGridLayout in QT??
    By sharvari in forum Newbie
    Replies: 3
    Last Post: 19th February 2008, 14:31
  2. QScrollArea's Scroll Bars
    By ToddAtWSU in forum Qt Programming
    Replies: 5
    Last Post: 19th September 2006, 13:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.