summaryrefslogtreecommitdiffstats
path: root/examples/helloprezo/CodeSection.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/helloprezo/CodeSection.qml')
-rw-r--r--examples/helloprezo/CodeSection.qml33
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/helloprezo/CodeSection.qml b/examples/helloprezo/CodeSection.qml
new file mode 100644
index 0000000..8493b99
--- /dev/null
+++ b/examples/helloprezo/CodeSection.qml
@@ -0,0 +1,33 @@
+import QtQuick 2.0
+
+Rectangle
+{
+ id: root
+
+ property string text
+ property real fontSize: parent.baseFontSize / 2
+
+ gradient: Gradient {
+ GradientStop { position: 0; color: "white" }
+ GradientStop { position: 1; color: "darkGray" }
+ }
+
+ color: "lightGray"
+ border.color: "darkGray"
+ border.width: 2
+ radius: 10
+
+ x: parent.width / 2
+ width: parent.width / 2
+ height: parent.height
+
+ Text {
+ id: textItem
+ anchors.fill: parent
+ anchors.margins: 20
+ text: root.text;
+ font.family: "courier"
+ font.pixelSize: root.fontSize
+ }
+
+}