[SOLVED] how to dynamic assign a value to qml item's property transform
QML and Qt Quick
3
Posts
2
Posters
3.1k
Views
1
Watching
-
wrote on 1 Nov 2011, 06:50 last edited by
the transform property in item is read-only, i cannot change this value while the program is running. Is there any method to modify it.
-
wrote on 1 Nov 2011, 07:48 last edited by
You can modify only properties of Rotation, Scale and Translate objects. For example, if you got:
@
Image {
id: img
source: "pics/qt.png"
transform: Rotation { id: rot; origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 }
}
@it is possible to change it like that:
@
rot.origin.x = 40
@ -
wrote on 1 Nov 2011, 07:59 last edited by
thanks very much, your answer can help me to resolve my problem
3/3