summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/helloworld/Cell.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/tutorials/helloworld/Cell.qml')
-rw-r--r--examples/declarative/tutorials/helloworld/Cell.qml32
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/declarative/tutorials/helloworld/Cell.qml b/examples/declarative/tutorials/helloworld/Cell.qml
new file mode 100644
index 0000000..ab6e565
--- /dev/null
+++ b/examples/declarative/tutorials/helloworld/Cell.qml
@@ -0,0 +1,32 @@
+//![0]
+import Qt 4.6
+
+//![1]
+Item {
+ id: container
+//![4]
+ property alias color: rectangle.color
+//![4]
+//![5]
+ signal clicked(string color)
+//![5]
+
+ width: 40; height: 25
+//![1]
+
+//![2]
+ Rectangle {
+ id: rectangle
+ border.color: "white"
+ anchors.fill: parent
+ }
+//![2]
+
+//![3]
+ MouseRegion {
+ anchors.fill: parent
+ onClicked: container.clicked(container.color)
+ }
+//![3]
+}
+//![0]