summaryrefslogtreecommitdiffstats
path: root/examples/declarative/ui-components/tabwidget
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/ui-components/tabwidget')
-rw-r--r--examples/declarative/ui-components/tabwidget/TabWidget.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/declarative/ui-components/tabwidget/TabWidget.qml
index 9642e04..ce57213 100644
--- a/examples/declarative/ui-components/tabwidget/TabWidget.qml
+++ b/examples/declarative/ui-components/tabwidget/TabWidget.qml
@@ -43,9 +43,14 @@ import Qt 4.7
Item {
id: tabWidget
- property int current: 0
+ // Setting the default property to stack.children means any child items
+ // of the TabWidget are actually added to the 'stack' item's children.
+ // See the "Extending Types from QML" documentation for details on default
+ // properties.
default property alias content: stack.children
+ property int current: 0
+
onCurrentChanged: setOpacities()
Component.onCompleted: setOpacities()