aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/snippets
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-15 17:14:58 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-19 16:52:48 +0000
commit3ab62aed45e32120ba10ec972b92b5dcc79e527d (patch)
treeeed0fd7e4bc77d1919614fc27eab30637b0f3ea4 /tests/auto/snippets
parent0cf9d77f849a2b10e8eaa696e1254e5c3c50d5f5 (diff)
Docs: Navigation group
Change-Id: Id866d226fc651a39fffd887600b4bf54d2b7ac6e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/snippets')
-rw-r--r--tests/auto/snippets/data/qtlabscontrols-tabbar.qml37
-rw-r--r--tests/auto/snippets/data/qtlabscontrols-tabbutton.qml16
2 files changed, 53 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]
+}
diff --git a/tests/auto/snippets/data/qtlabscontrols-tabbutton.qml b/tests/auto/snippets/data/qtlabscontrols-tabbutton.qml
new file mode 100644
index 00000000..d2536e66
--- /dev/null
+++ b/tests/auto/snippets/data/qtlabscontrols-tabbutton.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import Qt.labs.controls 1.0
+
+//! [1]
+TabBar {
+ TabButton {
+ text: qsTr("Home")
+ }
+ TabButton {
+ text: qsTr("Discover")
+ }
+ TabButton {
+ text: qsTr("Activity")
+ }
+}
+//! [1]