aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/snippets/data/qtlabscontrols-tabbar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/snippets/data/qtlabscontrols-tabbar.qml')
-rw-r--r--tests/auto/snippets/data/qtlabscontrols-tabbar.qml37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/auto/snippets/data/qtlabscontrols-tabbar.qml b/tests/auto/snippets/data/qtlabscontrols-tabbar.qml
new file mode 100644
index 00000000..5a1e5c4e
--- /dev/null
+++ b/tests/auto/snippets/data/qtlabscontrols-tabbar.qml
@@ -0,0 +1,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]
+}