diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-11 13:51:37 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-11 14:26:31 +0000 |
commit | cf2db0c7d64441d1d2da783de1df5404990ebb89 (patch) | |
tree | 4c8917df8ed50e947dc8ad33257d764f48ca4f69 /src/quicktemplates2/qquicktabbar.cpp | |
parent | 558c9c36146579234d94c686be60503d52fc58d2 (diff) |
Doc: add an example how to create a flickable tab bar
Change-Id: Iad89f8d46b44ca2634d3f8ecd52431654ae5d7ac
Task-number: QTBUG-55129
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktabbar.cpp')
-rw-r--r-- | src/quicktemplates2/qquicktabbar.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktabbar.cpp b/src/quicktemplates2/qquicktabbar.cpp index 9a3995ab..6fe734bb 100644 --- a/src/quicktemplates2/qquicktabbar.cpp +++ b/src/quicktemplates2/qquicktabbar.cpp @@ -60,6 +60,18 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-tabbar.qml 1 + \section2 Flickable Tabs + + By default, TabBar resizes its buttons to fit the width of the control. + The available space is distributed equally to each button. The default + resizing behavior can be overridden by setting an explicit width for the + buttons. If the total width of the buttons exceeds the available width + of the tab bar, it automatically becomes flickable. + + \image qtquickcontrols2-tabbar-flickable.png + + \snippet qtquickcontrols2-tabbar-flickable.qml 1 + \sa TabButton, {Customizing TabBar}, {Navigation Controls}, {Container Controls} */ |