aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickrectangle/data
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-07-03 15:04:19 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-03 07:27:22 +0200
commitf39c22ecec295d44eb1604e0a5dd5400093f0322 (patch)
tree836c1f2d9abe90bf6214e19301dd518a65201f8b /tests/auto/quick/qquickrectangle/data
parente1b3ad7c831023c3e336414a16b69773adea4e26 (diff)
Allow resetting a Rectangle gradient.
If a gradient and a color are set on a rectangle, the gradient is used. This means that if you wish to override the gradient on a component with a color, you have to unset the gradient. Also remove the unused QQuickGradient::gradient() method. Task-number: QTBUG-23238 Change-Id: Ibd43cfe1bd4b867e4f6103f1d0dc0ed6176ab5c1 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickrectangle/data')
-rw-r--r--tests/auto/quick/qquickrectangle/data/gradient.qml14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickrectangle/data/gradient.qml b/tests/auto/quick/qquickrectangle/data/gradient.qml
new file mode 100644
index 0000000000..6d2a3c4646
--- /dev/null
+++ b/tests/auto/quick/qquickrectangle/data/gradient.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+
+ function resetGradient() {
+ gradient = undefined
+ }
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "gray" }
+ GradientStop { position: 1.0; color: "white" }
+ }
+}
+