summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/loader/Button.qml14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/declarative/loader/Button.qml b/examples/declarative/loader/Button.qml
new file mode 100644
index 0000000..3efedc4
--- /dev/null
+++ b/examples/declarative/loader/Button.qml
@@ -0,0 +1,14 @@
+Rect {
+ id: Container
+
+ property var text
+ signal clicked
+
+ height: Text.height + 10
+ width: Text.width + 20
+ pen.width: 1
+ radius: 4
+ color: "grey"
+ MouseRegion { anchors.fill: parent; onClicked: Container.clicked() }
+ Text { id: Text; anchors.centeredIn:parent; font.size: 10; text: parent.text }
+}