I want to sync contentY of two scrollable listviews as shown in this simplified code
Item {
SplitView {
orientation: Qt.Horizontal
Component1 {
id: left
contentY: right.contentY
}
Component1 {
id: right
contentY: left.contentY
}
}
}
//Component1.qml
Item {
property alias contentY: component2.contentY
Component2 {
id: component2
}
}
//Component2.qml
Item {
property alias contentY: list.contentY
ScrollView {
ListView {
id: list
}
}
}
It's working when I start or reload the QML scene and keep scrolling in only one splitview. However, as soon as I start scrolling in the other listview, the bidirectional binding is broken and contentY isn't in sync anymore. I can only scroll the listviews separately from each other. How can I avoid this? Is there a better way to sync contentY?