Results 1 to 2 of 2

Thread: Setting focus to top of QTextEdit

  1. #1
    Join Date
    Sep 2010
    Location
    Ontario Canada
    Posts
    23
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60 Maemo/MeeGo

    Default Setting focus to top of QTextEdit

    Hi all,

    I am populating a QTextEdit with text using;
    Qt Code:
    1. ui->textEdit->append(QString);
    To copy to clipboard, switch view to plain text mode 
    The focus is always at the end of the string after execution, is there any way to set the focus to the start of the string or top of the QTextEdit?
    I have tried
    Qt Code:
    1. QTextEdit::scroll(0,0)
    To copy to clipboard, switch view to plain text mode 
    with no joy...

    Any suggestions are appreciated!

    Cheers,
    Jon

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Setting focus to top of QTextEdit

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 8
    Last Post: 9th July 2010, 00:37
  2. Replies: 2
    Last Post: 5th March 2009, 10:34
  3. Replies: 0
    Last Post: 25th February 2009, 07:15
  4. Focus issues / Setting multiple focus
    By ComputerPhreak in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2007, 06:09
  5. Setting focus on Canvas
    By Kapil in forum Qt Programming
    Replies: 10
    Last Post: 17th May 2006, 12:55

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
  •  
Qt is a trademark of The Qt Company.