Results 1 to 3 of 3

Thread: Scrolling in QTextEdit Widget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Scrolling in QTextEdit Widget

    Hi,

    I'm using a read-only QTextEdit widget (in Qt4.3.1) as a log window in my application and I can write log messages to it without any problems. As the window fills up a vertical scroll bar is created as expected, however I couldn't find a way to force the view to include the cursor position so you always see the latest messages printed. Can someone tell me how to move the scroll bars (viewport) to the cursor position?

    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: Scrolling in QTextEdit Widget

    As far as I remember, QTextEdit::append() automatically scrolls down.
    J-P Nurmi

  3. #3
    Join Date
    Sep 2007
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Scrolling in QTextEdit Widget

    Thanks for super fast reply jpn, that works great!

Similar Threads

  1. QGraphicsView scrolling problem with 4.3.0
    By hb in forum Qt Programming
    Replies: 8
    Last Post: 30th August 2007, 22:18
  2. transparent background of the main widget
    By nagpalma in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2007, 17:52
  3. Replies: 2
    Last Post: 8th October 2006, 20:14
  4. Replies: 4
    Last Post: 24th March 2006, 22:50
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.