ListView: Change anchor onCurrentIndexChanged

  • hello,

    I wanna change the anchor of my ListView for a specifique Index value.
    But when "" is change the currentIndex is "reset" to the last value.

    For exemple:

            onCurrentIndexChanged: {
                console.log("currentIndex : " + currentIndex);
                if (currentIndex == 0)
           = banner.bottom
           = image.bottom

    Runtime output:

    //current currentIndex = 2
    //set currentIndex = 0 from qml
    currentIndex :  0
    currentIndex :  2

    it look like reset the currentIndex ?
    Is there any better way to change the anchor when index is changed ?

    Thanks in advance

Log in to reply

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