diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2014-04-22 16:22:31 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-23 07:09:29 +0200 |
commit | 80c440436179d97d84c8493d7e515ac27f28b624 (patch) | |
tree | 4e43644a203705e010722fb0e0ca5b025d1e3ab7 /src/controls/TabView.qml | |
parent | e974e5ddadf56f199c6cb41fff554af38d9ed183 (diff) | |
download | qtquickcontrols-80c440436179d97d84c8493d7e515ac27f28b624.tar.gz |
Fix missing tabs in touch example
The only reason that the we calculated the tab count
explicitly before was that we were using an array.
Now that we are using a model there is no longer any
need to keep track of the count independently of the model.
This fix prevents the count from originally showing as 0 and
prevents an extra value change. In addition the count
is now correctly marked as readonly.
Task-number: QTBUG-38421
Change-Id: I53a5d0df3367c850a7c6846729660dd0f63238d5
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Diffstat (limited to 'src/controls/TabView.qml')
-rw-r--r-- | src/controls/TabView.qml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml index 8f09cf3c..3c6da297 100644 --- a/src/controls/TabView.qml +++ b/src/controls/TabView.qml @@ -63,7 +63,7 @@ FocusScope { property int currentIndex: 0 /*! The current tab count */ - property int count: 0 + readonly property int count: __tabs.count /*! The visibility of the tab frame around contents */ property bool frameVisible: true @@ -157,7 +157,6 @@ FocusScope { var child = __tabs.get(i).tab child.visible = (i == currentIndex ? true : false) } - count = __tabs.count } activeFocusOnTab: false |