diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-09 23:45:20 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-10 10:48:53 +0000 |
commit | 167f38750f23d226e1b5fc18f783fe6f4d4adf3e (patch) | |
tree | 99581005b3501b429cae7859b8beda9b9ddd6bb4 /src | |
parent | a03b6fec6b3551a6302aa1f8d7f3b0044cf27c4b (diff) |
TabBar: cull tabs outside the bar
Same as a055629 for SwipeView, and 9cf30f1 for Menu. This hides the
tabs until they become visible in the bar. Hiding them explicitly is
not an option, because then they will never show up. This technique
is used in QQuickItemView::initItem() and FxViewItem::setVisible().
Task-number: QTBUG-55129
Change-Id: I84a9e0acf6109dfff72130f7a2bf1e5e992829d8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquicktabbar.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktabbar.cpp b/src/quicktemplates2/qquicktabbar.cpp index a980a725..9a3995ab 100644 --- a/src/quicktemplates2/qquicktabbar.cpp +++ b/src/quicktemplates2/qquicktabbar.cpp @@ -187,6 +187,7 @@ void QQuickTabBar::itemAdded(int index, QQuickItem *item) { Q_D(QQuickTabBar); Q_UNUSED(index); + QQuickItemPrivate::get(item)->setCulled(true); // QTBUG-55129 if (QQuickTabButton *button = qobject_cast<QQuickTabButton *>(item)) QObjectPrivate::connect(button, &QQuickTabButton::checkedChanged, d, &QQuickTabBarPrivate::updateCurrentIndex); if (isComponentComplete()) |