QML - 移动到可轻弹的顶部底部

Aki*_*iva 3 qt qml

你如何告诉 flickable 移动到当前页面的底部。QML - 移至顶部 #TOP没有为此提供答案。

ast*_*tre 5

您需要计算它并将其设置为 contentY。例如:

Flickable {
    width: 200; height: 200
    contentWidth: image.width; contentHeight: image.height

    Image { id: image; source: "file:///path/toBigImageFile" }

    contentY : contentHeight-height
}
Run Code Online (Sandbox Code Playgroud)