QML: using Matrix4x4 transform
问题 How do you rotate, using Matrix4x4 transform, a QML item around another axis than z, with the center of the item as origin of the transformation? To rotate around the y axis with (0,0) as origin, I tried naively: Image { source: "..." width: 100 height: 100 transform: Matrix4x4 { property real a: Math.PI / 4 matrix: Qt.matrix4x4( Math.cos(a), 0, -Math.sin(a), 0, 0, 1, 0, 0, Math.sin(a), 0, Math.cos(a), 0, 0, 0, 0, 1) } } As a result, I get a cut width item whereas I am looking for a