我在 QML 中实现了一个简单的列表模型和列表委托,现在很好奇使底层列表循环是否可行。这是代码片段:
Common.MarketsListView {
id: markets
anchors.top: logoImage.bottom
anchors.topMargin: 5
cacheBuffer: 20000
NumberAnimation on x {
running: runtime.isActiveWindow
loops: Animation.Infinite
from: 0
to: -300
duration: 20000
}
目前,列表缓慢地向左移动,但当它到达末尾时,只显示最后几项。所以我要么使底层列表循环,要么硬编码跳转到第一个列表项:(