Results 1 to 2 of 2

Thread: How to detect scroll on QtextEdit

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default How to detect scroll on QtextEdit

    I dont know how to connect or use the scrollbar events for a QtextEdit.
    By now I use at paintevent this:
    Qt Code:
    1. ((QAbstractScrollArea*)txt_editor)->verticalScrollBar()->value()<<"";
    2. QTextCursor first_clock = txt_editor->cursorForPosition(QPoint(0,0));
    To copy to clipboard, switch view to plain text mode 
    Is there any other way ? Am I doing something strange ?
    Thanks

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

    Default Re: How to detect scroll on QtextEdit

    What do you want to do? You don't have to cast in line #1, that's for sure.
    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. hangup vertical scroll bar in qtextedit
    By mero in forum Qt Programming
    Replies: 1
    Last Post: 19th February 2011, 18:59
  2. QTextedit scroll or paint problem
    By pavanbarot in forum Qt Programming
    Replies: 0
    Last Post: 29th December 2010, 13:22
  3. Replies: 1
    Last Post: 28th June 2008, 21:23
  4. QTextEdit + auto scroll
    By jbpvr in forum Qt Programming
    Replies: 7
    Last Post: 25th March 2008, 09:30
  5. Replies: 6
    Last Post: 17th January 2008, 23:46

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.