【发布时间】:2017-04-28 12:41:37
【问题描述】:
我有一个 SwipeView,它通过 Repeater 和 Loader 加载其内部元素。
我想通过单击 SwipeView 左右的箭头在项目之间向前和向后滑动。 如何在 QML 中实现这种行为?
SwipeView {
id: __swipeView
Layout.fillHeight: true
Layout.fillWidth: true
Repeater {
model: 3
Loader {
source: "qrc:/../SwipeDelegate.qml"
}
}
}
【问题讨论】:
-
最近有人问了类似的问题:stackoverflow.com/questions/43578012/…
-
好吧,这个例子和我要找的类似,只是我有 SwipeView file.qml 和另一个 file.qml SwipeView 委托,不能在委托中使用 SwipeView 方法