[Qt-qml] Rotation/RotationAnimation

Jason H scorp1us at yahoo.com
Wed Jul 14 04:47:05 CEST 2010


Thanks. I didn't end up using Flickable, but I got the rotation scheme from it. 

The only thing I noticed id that if I use "achor.verticalCenter: 
parent.verticalCenter" it doesn't actually center correctly. It "seems" too low.

Rect{
          id: me
          width: 1024
          height: 768
          Text{ 

		property int angle: 270
		id: top
		text: "lorum ipsum";  font.family: "Verdana"; font.pointSize:64; color: 
"Black";
		//y:  ?? // I should be able to use anchor.verticalCenter here.
		x: 0
		transform: Rotation {
			id: toprotation
			origin.x: 0;
			axis.x: 0; axis.y: 1; axis.z: 0
			angle: top.angle
		}
		NumberAnimation on angle {
			from: 270
			to: 360
			duration: 1000
		}
	}
}




----- Original Message ----
From: Alan Alpert <alan.alpert at nokia.com>
To: qt-qml at trolltech.com
Sent: Tue, July 13, 2010 9:45:46 PM
Subject: Re: [Qt-qml] Rotation/RotationAnimation

On Wed, 14 Jul 2010 00:43:37 ext Jason H wrote:
> It looks like at a low level, we can rotate things on X/Y axis as well
> (flips), in addition to z. (flat
> 
> spin) I am trying to figure out how to animate a flip on X or Y axis.
> 
> There is a Rotation element that takes axis { x, y, z} but this seems for
> satic rotations.
> RotationAnimation seems to leave out the axis designation and only do Z
> (spin).
> 
> How can I do X/Y flips in QML?
> 

Have you looked at the Flipable element yet?
http://doc.qt.nokia.com/4.7-snapshot/qml-flipable.html

-- 
Alan Alpert
Software Engineer
Nokia, Qt Development Frameworks
_______________________________________________
Qt-qml mailing list
Qt-qml at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml



      




More information about the Qt-qml mailing list