1  import QtQuick 2.12
2  import QtQuick.Window 2.12
3  import QtQuick.Controls 2.1
4  Window {
5      width: 640
6      height: 480
7      visible: true
8      title: qsTr("Page-PageIndicator-SwipeView")
9      SwipeView {
10        id: sview
11        anchors.fill: parent
12        currentIndex: 0
13        Page {
14            id: primerElemement
15            Rectangle {
16                anchors.fill: parent
17                color:"red"
18                Text {
19                    font.pixelSize: 20
20                    anchors.centerIn: parent
21                    color: "white"
22                    text: " Red Page "
23                }
24            }
25        }
26        Page {
27            id: secondElement
28            Rectangle {
29                anchors.fill: parent
30                color:"blue"
31                Text {
32                    font.pixelSize: 20
33                    anchors.centerIn: parent
34                    color: "white"
35                    text: " Blue Page "
36                }
37            }
38        }
39        Page {
40            id: thirdElement
41            Rectangle {
42                anchors.fill: parent
43                color:"green"
44                Text {
45                    font.pixelSize: 20
46                    anchors.centerIn: parent
47                    color: "white"
48                    text: " Green Page "
49                }
50            }
51        }
52    }
53    PageIndicator {
54        id: pi
55        count: sview.count
56        interactive: true
57        currentIndex: sview.currentIndex
58        anchors.bottom: sview.bottom
59        anchors.horizontalCenter: parent.horizontalCenter
60    }
61 }
