Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Kinetic scrolling via mouse wheel
Forum Updated to NodeBB v4.3 + New Features

Kinetic scrolling via mouse wheel

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 971 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jsmolka
    wrote on last edited by
    #1

    Hey all,

    I have a subclassed QTableWidget with some rows and I would like to scroll though it smoothly. I have tried using QScroller which seems to be class of choice for this kind of problem but I wasn't able to achieve what I wanted.

    I was only able to get kinetic scrolling when clicking at a row and then moving the mouse up (like touching a list of the smartphone). What I would like to achieve is pretty much the same but with scrolling the mouse wheel instead.

    Is there a way to do this with the predefined class or do I need to implement this myself?

    JonBJ 1 Reply Last reply
    0
    • J jsmolka

      Hey all,

      I have a subclassed QTableWidget with some rows and I would like to scroll though it smoothly. I have tried using QScroller which seems to be class of choice for this kind of problem but I wasn't able to achieve what I wanted.

      I was only able to get kinetic scrolling when clicking at a row and then moving the mouse up (like touching a list of the smartphone). What I would like to achieve is pretty much the same but with scrolling the mouse wheel instead.

      Is there a way to do this with the predefined class or do I need to implement this myself?

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by JonB
      #2

      @jsmolka
      You don't say whether you are using desktop or mobile (assume desktop because of mousewheel?).

      Articles like:
      https://falsinsoft.blogspot.co.uk/2015/09/qt-snippet-use-qscroller-with.html
      http://www.qtcentre.org/threads/55778-Scrolling-using-QScroller-class
      seem to suggest it should work with desktop mouse, or give hints for code.

      Just checking you've read them.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jsmolka
        wrote on last edited by
        #3

        @JonB

        Yes. I am on PC and those articles don't really help. I want to scroll the mouse wheel and have a QScroller like effect. From what I've read QScroller only supports the left and right mouse button because it wants them to be pressed. I wasn't able to find something about the mouse wheel anywhere online.

        JonBJ 1 Reply Last reply
        0
        • J jsmolka

          @JonB

          Yes. I am on PC and those articles don't really help. I want to scroll the mouse wheel and have a QScroller like effect. From what I've read QScroller only supports the left and right mouse button because it wants them to be pressed. I wasn't able to find something about the mouse wheel anywhere online.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by
          #4

          @jsmolka
          This is way beyond my pay-grade, but at the end of the day if it's really the case that QScroller doesn't do what you want with mousewheel, can you not intercept those events and do your own QScrollBar::setValue() directly if there's no other way? I leave this possibitily with you.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved