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 }         ]     } } 

enter image description here


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -