summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-11-27 16:42:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-30 18:00:34 +0100
commit633f26f2d28a9d81afd767b6b4abc307646f9e11 (patch)
tree53cecea5aa936a4faebd8bf8a3f37afedda8f9d7
parent34523bb83651ae009d28748d64697eb8ade9a639 (diff)
downloadqtquickcontrols-633f26f2d28a9d81afd767b6b4abc307646f9e11.tar.gz
Fix warning printed when using TabView
This fixes the binding loop warning that is printed in any application that makes use of TabView. It was casued by a QTBUG-35038 and a proper fix for that will be posted to the stable branch. Task-number: QTBUG-35134 Change-Id: Ia60c789d9fb8ee662215628fa9733b17cf9be90c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
-rw-r--r--src/controls/Private/TabBar.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/controls/Private/TabBar.qml b/src/controls/Private/TabBar.qml
index 592ec348..2e374f99 100644
--- a/src/controls/Private/TabBar.qml
+++ b/src/controls/Private/TabBar.qml
@@ -119,7 +119,10 @@ FocusScope {
interactive: false
focus: true
- width: Math.min(availableWidth, count ? contentWidth : availableWidth)
+ // Note this will silence the binding loop warnings caused by QTBUG-35038
+ // and should be removed when this issue is resolved.
+ property int contentWidthWorkaround: contentWidth > 0 ? contentWidth: 0
+ width: Math.min(availableWidth, count ? contentWidthWorkaround : availableWidth)
height: currentItem ? currentItem.height : 0
highlightMoveDuration: 0