gpt4 book ai didi

android - Qt Qml - android - 调整 ListView 滚动速度/速度

转载 作者:可可西里 更新时间:2023-11-01 11:42:50 25 4
gpt4 key购买 nike

[Qt Quick 2.0 (qml) - Android]我进行了搜索,但不知道如何提高 ListView 中滚动的速度:

ListView {
width: 180; height: 200

Component {
id: contactsDelegate
Rectangle {
id: wrapper
width: 180
height: yeah.height
Column{
id:yeah
Text {
id: contactInfo
text: name + ": " + number
}
Image{
source: jpgsrc
}
}
}
}

model: ContactModel {}
delegate: contactsDelegate
focus: true
}

问题

假设我的 ContactModel 有 200 个元素。我的问题是这些元素的滚动速度太慢了。滚动整个列表花费的时间太长。

我想知道如何修改该代码以使滚动体验更快(至少以更高的速度)。

谢谢

最佳答案

要提高滚动速度,您可以使用 2 个 ListView 属性:cacheBuffermaximumFlickVelocity

maximumFlickVelocity 直接影响速度,而 cacheBuffer 如果由于 ListView 元素的动态加载缓慢而出现速度问题,则应更新。

关于android - Qt Qml - android - 调整 ListView 滚动速度/速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35537001/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com