QML Diagonal Gradient in an Rectangle
-
The only way that I know of is to use 2 rectangles and set the parent to clip and have
the child be your gradient and then rotate the child.!http://i52.tinypic.com/2vx0t46.png!
@
Rectangle {
width: 100
height: 100
clip: trueRectangle { x: -17 y: -18 width: 135 height: 137 rotation: 123 gradient: Gradient { GradientStop { position: 0 color: "#ffffff" } GradientStop { position: 1 color: "#000000" } } } }
@
You could also try qmlcanvas -> http://qt.gitorious.org/qt-labs/qmlcanvas