qt - How to rotate an element on both axes with different angle values -
if need rotate element in qml in order achieve sort of 3d flip effect can
transform: rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 24 }
how can achieve same thing time rotate both x , y different angle values?
the transform property of item
list, can apply multiple rotations:
import qtquick 2.3 import qtquick.window 2.2 window { visible: true width: 200 height: 200 rectangle { width: 100 height: 100 anchors.centerin: parent color: "red" transform: [ rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 24 }, rotation { origin.x: 30; origin.y: 30; axis { x: 1; y: 0; z: 0 } angle: 60 } ] } }
Comments
Post a Comment