Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Programmatically scrolling ScrollView
Forum Updated to NodeBB v4.3 + New Features

Programmatically scrolling ScrollView

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 3.2k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    raichu
    wrote on last edited by
    #1

    It appears that ScrollView cannot be scrolled using direction keys, so I tried binding Actions to directional keys and do the scrolling manually.
    I thought this would be possible by altering viewport.x and viewport.y, but nope :)

    Any ideas how to do it?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aamer4yu
      wrote on last edited by
      #2

      Do you mean QAbstractScrollArea ??

      Have a look at QAbstractScrollArea::verticalScrollBar / QAbstractScrollArea::horizontalScrollBar

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

        I would like to do this too. I have a complex report all wrapped up in a ScrollView and would like to jump to virtual pages of the scrollview. I noticed TableView has a method positionViewAtRow(), but don't want to redesign if I can do something similar in the scrollview

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jflatt
          wrote on last edited by
          #4

          I was finally able to move my scroll position by setting ScrollView.flickableItem.contentY

          1 Reply Last reply
          1

          • Login

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