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/quicktemplates2/qquicktabbar.cpp | |
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/quicktemplates2/qquicktabbar.cpp')
-rw-r--r-- | src/quicktemplates2/qquicktabbar.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquicktabbar.cpp b/src/quicktemplates2/qquicktabbar.cpp index 27df1c99..6d11f72a 100644 --- a/src/quicktemplates2/qquicktabbar.cpp +++ b/src/quicktemplates2/qquicktabbar.cpp @@ -60,13 +60,24 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-tabbar.qml 1 - \section2 Flickable Tabs + \section2 Resizing 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. + buttons. + + The following example illustrates how to keep each tab button at their + implicit size instead of being resized to fit the tabbar: + + \borderedimage qtquickcontrols2-tabbar-explicit.png + + \snippet qtquickcontrols2-tabbar-explicit.qml 1 + + \section2 Flickable Tabs + + If the total width of the buttons exceeds the available width of the tab bar, + it automatically becomes flickable. \image qtquickcontrols2-tabbar-flickable.png |