This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/example/app/test-layout.qml

41 lines
726 B
QML
Raw Normal View History

import QtQuick 2.0
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.15
ApplicationWindow {
visible: true
2021-04-23 17:56:08 +08:00
width: 600
height: 800
title: qsTr("Scroll")
2021-05-07 18:17:07 +08:00
SwipeView {
id: view
2021-05-07 18:17:07 +08:00
currentIndex: 0
anchors.fill: parent
2021-03-16 15:20:46 +08:00
2021-05-07 18:17:07 +08:00
Rectangle {
id: firstPage
2021-04-16 10:06:15 +08:00
color: 'red'
}
2021-05-07 18:17:07 +08:00
Rectangle {
id: secondPage
color: 'green'
2021-04-16 10:06:15 +08:00
}
2021-05-07 18:17:07 +08:00
Rectangle {
id: thirdPage
color: 'blue'
2021-04-16 10:06:15 +08:00
}
2021-05-07 18:17:07 +08:00
}
2021-04-16 10:06:15 +08:00
2021-05-07 18:17:07 +08:00
PageIndicator {
id: indicator
2021-04-16 10:06:15 +08:00
2021-05-07 18:17:07 +08:00
count: view.count
currentIndex: view.currentIndex
2021-04-16 10:06:15 +08:00
2021-05-07 18:17:07 +08:00
anchors.bottom: view.bottom
anchors.horizontalCenter: parent.horizontalCenter
}
}