aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/snippets/data/qtlabscontrols-tabbar.qml
blob: 5a1e5c4ee14b3d3f1ef03bf9c6d3e148e06454d1 (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
import QtQuick 2.0
import QtQuick.Layouts 1.3
import Qt.labs.controls 1.0

Column {
    width: 300

    //! [1]
    TabBar {
        id: bar
        width: parent.width
        TabButton {
            text: qsTr("Home")
        }
        TabButton {
            text: qsTr("Discover")
        }
        TabButton {
            text: qsTr("Activity")
        }
    }

    StackLayout {
        width: parent.width
        currentIndex: bar.currentIndex
        Item {
            id: homeTab
        }
        Item {
            id: discoverTab
        }
        Item {
            id: activityTab
        }
    }
    //! [1]
}