November 1, 2011

onlypass8 onlypass8
Lab Rat
5 posts

[SOLVED] how to dynamic assign a value to qml item’s property transform

 

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.

2 replies

November 1, 2011

task_struct task_struct
Hobby Entomologist
344 posts

You can modify only properties of Rotation, Scale and Translate objects. For example, if you got:

  1. Image {
  2. id: img
  3.          source: "pics/qt.png"
  4.          transform: Rotation { id: rot; origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 }
  5. }

it is possible to change it like that:

  1.      rot.origin.x = 40

 Signature 

“Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.”
- Linus Torvalds

November 1, 2011

onlypass8 onlypass8
Lab Rat
5 posts

thanks very much, your answer can help me to resolve my problem

 
  ‹‹ Apply Linear Impulse using Box2d in QML      [SOLVED]webview and listview in a Flickable. ››

You must log in to post a reply. Not a member yet? Register here!