From 4621721a9c3705dc9fbc3b6f15e6122f913e5c72 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Mon, 23 Nov 2009 11:38:16 +1000 Subject: Demonstrate "container" type objects. --- examples/declarative/tabwidget/TabWidget.qml | 42 ++++++++++++++++++++++++++++ examples/declarative/tabwidget/tabs.qml | 29 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 examples/declarative/tabwidget/TabWidget.qml create mode 100644 examples/declarative/tabwidget/tabs.qml diff --git a/examples/declarative/tabwidget/TabWidget.qml b/examples/declarative/tabwidget/TabWidget.qml new file mode 100644 index 0000000..c56f41e --- /dev/null +++ b/examples/declarative/tabwidget/TabWidget.qml @@ -0,0 +1,42 @@ +import Qt 4.6 + +Item { + id: page + property int current: 0 + default property alias content: stack.children + onCurrentChanged: setOpacities() + Component.onCompleted: setOpacities() + function setOpacities() + { + for (var i=0; iRoses are red"; font.pixelSize: 24 + wrap: true; width: parent.width-20 } + } + Rectangle { + property string title: "Green" + color: "green" + anchors.fill: parent + Text { anchors.centerIn: parent; text: "
Flower stems are green"; font.pixelSize: 24; + wrap: true; width: parent.width-20 } + } + Rectangle { + property string title: "Blue" + color: "blue" + anchors.fill: parent + Text { anchors.centerIn: parent; text: "
Violets are blue"; color: "white"; font.pixelSize: 24 + wrap: true; width: parent.width-20 } + } +} -- cgit v0.12