diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-10-02 15:40:36 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-10-03 13:33:59 +0000 |
commit | e343d463dbf5f95f3d0fc7f837ee6a58f1855ebc (patch) | |
tree | 2eed75702db84863abc9aea6a32b8a19c739cd5e /src/imports/controls/doc | |
parent | b6cfb4a1e30598a6176f9bbfdbd1495b37c7f59a (diff) |
Doc: add a TabBar example with explicitly sized tabs
Task-number: QTBUG-55129
Change-Id: I0770996f741b431f9b003810df94fab8416b4cd3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/doc')
-rw-r--r-- | src/imports/controls/doc/images/qtquickcontrols2-tabbar-explicit.png | bin | 0 -> 2701 bytes | |||
-rw-r--r-- | src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml | 52 |
2 files changed, 52 insertions, 0 deletions
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tabbar-explicit.png b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-explicit.png Binary files differnew file mode 100644 index 00000000..cdfee3d0 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-explicit.png diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml new file mode 100644 index 00000000..f3e24f10 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.6 +import QtQuick.Controls 2.0 + +Item { + width: 360 + height: childrenRect.height + +//! [1] +TabBar { + width: parent.width + TabButton { + text: "First" + width: implicitWidth + } + TabButton { + text: "Second" + width: implicitWidth + } + TabButton { + text: "Third" + width: implicitWidth + } +} +//! [1] +} |