diff options
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml')
-rw-r--r-- | src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml new file mode 100644 index 0000000000..d686d452e9 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml @@ -0,0 +1,26 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls + +Item { + width: 360 + height: bar.height + +//! [1] +TabBar { + id: bar + width: parent.width + + Repeater { + model: ["First", "Second", "Third", "Fourth", "Fifth"] + + TabButton { + text: modelData + width: Math.max(100, bar.width / 5) + } + } +} +//! [1] +} |