Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QTableView Vertical scroll bar speed

QTableView Vertical scroll bar speed

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 1.9k 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.
  • K Offline
    K Offline
    kumararajas
    wrote on 21 Aug 2016, 13:22 last edited by
    #1

    Hello,

    I want to get more control on the scrollbar which is part of tableview.

    There are multiple questions -

    1. When the up arrow or down arrow key pressed, I would like to get the release event to perform some operations. How can I get it?

    2. I want to control the scrolling speed. Meaning, when I press and hold the scrollbar up or down arrow, I see that the table rows are scrolling at the defined speed. I want to control that and reduce the speed, for example, 3 rows per second. How can I do that?

    3. What does the SliderNoAction means? When does this event occurs?

    Thanks,
    Kumara

    --Kumar

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 21 Aug 2016, 20:17 last edited by
      #2

      Hi,

      1. Either implement an event filter or subclass QScrollBar and reimplement keyReleaseEvent
      2. The pageStep property is a starting point but if you want rather a time based scrolling, you'll have to implement your own scroll bar.
      3. That's not an event per se. In any case, AFAIK, it's used by Qt for the repeat action.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • K Offline
        K Offline
        kumararajas
        wrote on 23 Aug 2016, 11:23 last edited by
        #3

        @SGaist Thanks for the answers Sam!

        Answer for 1st, I have implemented and it works cool!

        1. Implementing my own scroll bar, hmm, I dont want to go through the whole pain that Qt took for implementing this. I wish Qt provides interface to manage this. But, when I took a quick look at the source code, it looks like, there is no speed management implemented.

        2. Thanks for the information. But, if this is internal to Qt, why should they show it for end user, it confuses a bit. At a moment, I thought that, when slider is operated and user has now stopped operating, NoAction would be generated. But that is not correct as you mentioned.

        --Kumar

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 23 Aug 2016, 11:42 last edited by
          #4
          1. AFAIK, there's not indeed
          2. It's not internal, what I was showing is the use of that enum value in Qt's own code.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • K Offline
            K Offline
            kumararajas
            wrote on 25 Aug 2016, 07:14 last edited by
            #5

            Thanks for the answers Sam!

            --Kumar

            1 Reply Last reply
            0

            1/5

            21 Aug 2016, 13:22

            • Login

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