diff options
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml')
-rw-r--r-- | src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml new file mode 100644 index 0000000000..cc3fdfaced --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml @@ -0,0 +1,40 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls + +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] +} |