Results 1 to 6 of 6

Thread: Kinetic scrolling in QTextArea/Browser

  1. #1
    Join Date
    Jul 2009
    Location
    Valladolid, Spain
    Posts
    125
    Thanks
    16
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Kinetic scrolling in QTextArea/Browser

    I'm looking for a library/example implementing kinetic scrolling in a QTextArea/Browser.
    I had a look at Flickable/FlickCharm, but they don't really do what I want.
    Those libs enable the kinetic scrolling effect after you hold left-mouse-button and drag fast, and that's why you can't select text while that's enabled.
    I'd like to be able to select text, so, no kinetic scrolling while dragging, but instead of that it should be activated on mouse scroll button.

    Any ideas? Thanks

  2. #2
    Join Date
    Jul 2009
    Location
    Valladolid, Spain
    Posts
    125
    Thanks
    16
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Kinetic scrolling in QTextArea/Browser

    Nobody?
    I know that KDE team had to implement something similar to Dolphin, but I can't find anything related in git.

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

    Default Re: Kinetic scrolling in QTextArea/Browser

    Take the flick charm code and modify it to react on mouse wheel instead of mouse release.
    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.


  4. #4
    Join Date
    Jul 2009
    Location
    Valladolid, Spain
    Posts
    125
    Thanks
    16
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Kinetic scrolling in QTextArea/Browser

    Well, that isn't really helpful :/
    I already knew that I need to ake it work with the QWheelEvent, but I don't know how. I need some example.

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

    Default Re: Kinetic scrolling in QTextArea/Browser

    What is it exactly that you don't know? You need to modify the event filter implementation and react on mouse wheel events to trigger auto-scrolls. Or you can just make scrolling triggered by the middle mouse button instead of left mouse button to trigger scrolling and retain the selection functionality.
    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.


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

    Default Re: Kinetic scrolling in QTextArea/Browser

    By the way, have a look at QAbstractKineticScroller. It might be easier if you just implement this interface. You might need to borrow some code from the maemo port, I don't know if this class is part of mainstream Qt.
    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. QTextArea getting the current line of visible area(scroll)
    By ubuntudevelop78 in forum Qt Programming
    Replies: 0
    Last Post: 26th November 2009, 06:19
  2. Qt Kinetic: adding items to list
    By Diph in forum Qt Programming
    Replies: 1
    Last Post: 10th November 2009, 08:27
  3. Kinetic scrolling in QListWidget
    By jimiq in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2009, 09:43
  4. kinetic scrolling
    By ram136682 in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 25th August 2008, 07:20
  5. Replies: 1
    Last Post: 1st November 2007, 14:09

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.