app/resources/qml/Components/SwipeGallery.qml
2021-07-05 20:55:34 +02:00

37 lines
726 B
QML

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
spacing: width * 0.2
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
}
}