我尝试使用 Flickable
启用在我的应用程序中滚动内容 . 现在内容是可滚动的,但内容隐藏了顶级内容 .
码:
Flickable {
anchors.top: pageMessagesHeader.bottom
anchors.topMargin: 20
boundsBehavior: Flickable.DragOverBounds
contentHeight: contentItem.childrenRect.height
contentWidth: contentItem.childrenRect.width
height: 500
width: 400
ScrollBar.vertical: ScrollBar {}
Rectangle {
color: "white"
height: 1000
width: 400
id: listMessages
}
}
1 回答
Here你可以找一个句子:
哪个是解决方案 .
只需添加
对你的代码,你会很好 .
剪辑有一些perfomance disavantages,这会对应用程序的增长产生很大影响 . 因此,应仔细评估其用法,特别是在视图场景之外 .