Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to scroll an element of a ListView to bottom when user clicks on it, with an animation. I want to use Behavior for the animation, but I do something wrong. I have no problem with the scroll itself:

onClicked: {
    mouse.accepted = false
    goToIndex(index);
}

function goToIndex(index) {
   listView.positionViewAtIndex(index,listView.contain)
}

But Behavior doesn't work:

ListView {
    id: listView

    Behavior on contentY {
        NumberAnimation {duration: 500}
    }
}

What's wrong?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.