Moving ListView Y position Vertically on focus of Child



  • Hi
    I am working on ListView in QML which has an textinput as an delegate item.It contains n no of items in the model. i could display only 4 items on my screen.As my screen is small, wenever i click on next button on the screen one of the child element needs to be moved up vertically so as user can see it. How do i move listview up exactly to a point to see child item.
    I used like below one which does not give me accurate result
    // listAddUserView.contentY=listAddUserView.contentItem.children[index].y

    Is that the right approach ? Or Do we have any other element to relate to it ?

    Pls help me and thanks in advance


  • Moderators

    @Beemaneni-Bala Try setting snapMode to ListView.SnapToItem.


Log in to reply
 

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