Results 1 to 2 of 2

Thread: How to track scrolling

  1. #1
    Join Date
    Sep 2009
    Posts
    64

    Default How to track scrolling

    Is there a scroll event or something similar that will tell me how much my widget has been scrolled?

    What i have right now is I am drawing a box over a QTableWidget and i want to be able to move this box up/down with the table widget when the table widget is scrolled up/down.

    Im sure there is something somewhere in Qt to get this data i just cant seem to find it.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to track scrolling

    The QAbstractSlider::valueChanged() signal from the relevant scroll bar is what you are after. Look at the Frozen Column example for something quite similar; it synchronises two sliders and also adjusts an overlaid widget.

Similar Threads

  1. scrolling spectrogram
    By mcarter in forum Qwt
    Replies: 2
    Last Post: 30th November 2009, 15:22
  2. how to track mouse button inside treeItemClickAction?
    By sudhansu in forum Qt Programming
    Replies: 2
    Last Post: 24th November 2009, 12:07
  3. Scrolling QTextEdit
    By Dayton in forum Qt Programming
    Replies: 2
    Last Post: 3rd June 2009, 22:11
  4. QPlainTextEdit scrolling
    By roxton in forum Qt Programming
    Replies: 1
    Last Post: 16th July 2008, 17:55
  5. Keeping track of columns in custom models
    By darkadept in forum Qt Programming
    Replies: 1
    Last Post: 28th February 2008, 21:29

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.