summaryrefslogtreecommitdiffstats
path: root/examples/declarative/ui-components/tabwidget
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-22 02:21:39 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-22 02:21:39 (GMT)
commit2b6339d3b8f333a686b5e215de280819a6c178bd (patch)
tree431955cffb241f1a82b47b1d4e8397c4743829e3 /examples/declarative/ui-components/tabwidget
parent7f3d9a76e9d956d9e7e4398ac20785070e214958 (diff)
parent2e0b872ed3f15db3f54fcf0cff7f2e412ba56e46 (diff)
downloadQt-2b6339d3b8f333a686b5e215de280819a6c178bd.zip
Qt-2b6339d3b8f333a686b5e215de280819a6c178bd.tar.gz
Qt-2b6339d3b8f333a686b5e215de280819a6c178bd.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Add screenshots for most examples and demos Rename example: edit -> textselection Clean up some examples Rename example and add minor improvements Rename example image file Spelling fix
Diffstat (limited to 'examples/declarative/ui-components/tabwidget')
-rw-r--r--examples/declarative/ui-components/tabwidget/TabWidget.qml8
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
}
}