[Qt-qml] ScalingAnimation in QML

Bartosh Wroblevksy bartosh at live.com
Sat Aug 14 00:24:58 CEST 2010


Hi

I would like to do a rotation animation through transition but would like to change the center of the rotation. Can I change the property "transformOrigin" on the fly?
   something like this

     Rectangle {
         id: rect
         width: 150; height: 100; anchors.centerIn: parent
         color: "red"
         smooth: true

         states: State {
             name: "rotated"; 
             PropertyChanges {transformOrigin: BottomRight; //how to change the transform origin on the fly
                              target: rect; rotation: 180 }
         }

         transitions: Transition {
             RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise }
         }
     }

Bartosh
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100813/bbeb843c/attachment.html 


More information about the Qt-qml mailing list