Programmatically scrolling ScrollView



  • 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?



  • Do you mean QAbstractScrollArea ??

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



  • 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



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.