summaryrefslogtreecommitdiffstats
path: root/examples/declarative/smooth/GradientRect.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/smooth/GradientRect.qml')
-rw-r--r--examples/declarative/smooth/GradientRect.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/declarative/smooth/GradientRect.qml b/examples/declarative/smooth/GradientRect.qml
new file mode 100644
index 0000000..267a487
--- /dev/null
+++ b/examples/declarative/smooth/GradientRect.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Item {
+ id: MyRect
+ property string color
+ property string border : ""
+ property int rotation
+ property int radius
+ property int borderWidth
+ property bool smooth: false
+
+ width: 80; height: 80
+ Item {
+ anchors.centerIn: parent; rotation: MyRect.rotation;
+ Rect {
+ anchors.centerIn: parent; width: 80; height: 80
+ border.color: MyRect.border; border.width: MyRect.border != "" ? 2 : 0
+ radius: MyRect.radius; smooth: MyRect.smooth
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: MyRect.color }
+ GradientStop { position: 1.0; color: "white" }
+ }
+ }
+ }
+}