diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-06-21 05:37:41 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-06-22 01:22:35 (GMT) |
commit | c8968fd143e079d4d2b79c88132caaffbefedd7d (patch) | |
tree | b16577cba1077738e8095c0ddb8faca20a17b1fb /examples/declarative/ui-components/tabwidget/TabWidget.qml | |
parent | d9e49c4399e506c878ce5125d4edcf384b867b26 (diff) | |
download | Qt-c8968fd143e079d4d2b79c88132caaffbefedd7d.zip Qt-c8968fd143e079d4d2b79c88132caaffbefedd7d.tar.gz Qt-c8968fd143e079d4d2b79c88132caaffbefedd7d.tar.bz2 |
Clean up some examples
Diffstat (limited to 'examples/declarative/ui-components/tabwidget/TabWidget.qml')
-rw-r--r-- | examples/declarative/ui-components/tabwidget/TabWidget.qml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/declarative/ui-components/tabwidget/TabWidget.qml index 93db4ff..9642e04 100644 --- a/examples/declarative/ui-components/tabwidget/TabWidget.qml +++ b/examples/declarative/ui-components/tabwidget/TabWidget.qml @@ -49,16 +49,17 @@ Item { onCurrentChanged: setOpacities() Component.onCompleted: setOpacities() - function setOpacities() - { + function setOpacities() { for (var i = 0; i < stack.children.length; ++i) { - stack.children[i].opacity = i == current ? 1 : 0 + stack.children[i].opacity = (i == current ? 1 : 0) } } Row { id: header + Repeater { + model: stack.children.length delegate: Rectangle { width: tabWidget.width / stack.children.length; height: 36 @@ -85,7 +86,6 @@ Item { onClicked: tabWidget.current = index } } - model: stack.children.length } } |