aboutsummaryrefslogtreecommitdiffstats
path: root/DemoApplication/main.qml
blob: b0e54cbaab4a15b7193fc811164b725a241ef2d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3

import CursorNavigation 1.0
import "pages"

ApplicationWindow {
    id: window
    width: 800
    height: 600
    visible: true
    title: qsTr("Cursor Navigation Demo Application")

    header: TabBar {
        id: tabBar
        width: parent.width
        TabButton {
            CursorNavigation.acceptsCursor: true
            text: qsTr("Page 1")
        }
        TabButton {
            CursorNavigation.acceptsCursor: true
            text: qsTr("Page 2")
        }
        TabButton {
            CursorNavigation.acceptsCursor: true
            text: qsTr("Page 3")
        }
    }

    contentData: StackLayout {
        anchors.fill: parent
        currentIndex: tabBar.currentIndex
        Page1 { }
        Page2 { }
        Page3 { }
    }
}