PDA

View Full Version : Rotating Gradient



JeffC
3rd June 2010, 16:30
Is there a way to rotate the gradient in QML, so it doesn't go from edge to edge? For example, can you make it go from red in one corner of a square to blue in the opposite corner?
Thanks

JD2000
3rd June 2010, 18:24
Yes, have a look at this http://doc.qt.nokia.com/4.7-snapshot/qml-rectangle.html

JeffC
3rd June 2010, 19:00
In those they rotate the rectangle and the gradient rotates with it. The goal I am trying to achieve is to have the gradient begin at one corner of the rectangle and finish at the opposite. The key part is from corner to corner, not edge to edge.

duc_bkav
3rd June 2012, 11:11
Hi everbody, can QML make gradient from centre to border of the element in omni directional