app/resources/qml/Components/SwipeGallery.qml

37 lines
697 B
QML
Raw Permalink Normal View History

import QtQuick 2.12
import QtQuick.Controls 2.12
Item {
id: control
property var images: []
SwipeView {
id: view
clip: true
anchors.fill: parent
anchors.margins: 1
anchors.bottomMargin: indicator.height
Repeater {
model: control.images.length
delegate: Image {
source: control.images[index]
fillMode: Image.PreserveAspectFit
}
}
}
PageIndicator {
id: indicator
anchors.bottom: control.bottom
anchors.horizontalCenter: parent.horizontalCenter
count: view.count
currentIndex: view.currentIndex
}
}