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. QML ListView end scrolling animation
Forum Updated to NodeBB v4.3 + New Features

QML ListView end scrolling animation

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 6.1k 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.
  • A Offline
    A Offline
    apap_
    wrote on last edited by
    #1

    Hi,

    I use key up and down to scroll my vertical listview, so I increment/decrement the listview current index when key pressed. My problem is I can't know when the scrolling animation ends. I tried these four events but no one works when the listview scrolling is only made with keyboard keys :
    @
    ListView{
    id: listview

        width: 360
        height: 300
        preferredHighlightBegin: 110
        preferredHighlightEnd: 111
        highlightRangeMode: "StrictlyEnforceRange"
    
        focus: true
        Keys.onUpPressed: listview.decrementCurrentIndex()
        Keys.onDownPressed: listview.incrementCurrentIndex()
        //onVerticalVelocityChanged: verticalVelocity == 0 ?  console.log("verticalVelocity == 0"): console.log("verticalVelocity != 0")
        //onMovingChanged: moving ?  console.log("moving"): console.log("not moving")
        //onMovementEnded: console.log("movement ended")
        //onFlickEnded: console.log("flick ended")
        ...
    

    }
    @
    These events work well when flicking the listview but how can I do when I only use keyboard keys pressed ?

    Regards

    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