A QML Item may have several transforms in several forms:
translation via x and y properties, rotaion via rotation properties group, scaling via scale properties group, and finally it has the transform property which contains a list of transformations to apply.
Clearly the transformations in the transform list are applied in order as they are declared.
But what is the order of the rest of transforms, will rotation be applied first or scale? and the translation will be applied after both of them? and if the transform list is specified will it be applied before or after other transformations have been applied?
QML has built-in smarts for inferring the origin of the transformations, so, often, you don't have to do anything, for instance, in the following, the 40x40 red
Rectanglewill rotate and scale and stay centered inside the 200x200 orangeRectangle.This means, most often, you should have no need to set
transformand rely thatrotationandscalewill do the job for you.In some cases, you may want to intentionally move and manipulate the origin of your
rotationandscale. You can do this by introducing a placeholderItemand assigning therotationandscaleto different elements: