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. Moving ListView Y position Vertically on focus of Child
Forum Updated to NodeBB v4.3 + New Features

Moving ListView Y position Vertically on focus of Child

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 454 Views 2 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.
  • B Offline
    B Offline
    Beemaneni Bala
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

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

      157

      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