1
votes

I have a button that changes the selected row of a QML TableView when clicked. My issue is that the transition animation of changing the row takes too long. Is there a way to disable it?

    Rectangle {
        height: 100
        width: 100
        MouseArea {
            anchors.fill: parent
            onClicked: {
                //the table will move few rows per second (too slow)
                agendarClienteTableView.currentRow = agendarClienteTableView.currentRow + 100 
                agendarClienteTableView.selection.clear()
                agendarClienteTableView.selection.select(agendarClienteTableView.currentRow + 100)
                agendarClienteTableView.forceActiveFocus()
            }
        }
    }
1

1 Answers

0
votes

You can use function positionViewAtRow() to slice to row you want.

See link below:

https://doc.qt.io/qt-5/qml-qtquick-controls-tableview.html#positionViewAtRow-method