[Qt-qml] access child transform

michael.brasser at nokia.com michael.brasser at nokia.com
Tue May 3 06:32:30 CEST 2011


Hi,

On 02/05/2011, at 1:26 PM, ext Tibo W wrote:

Inside a NumberAnimation, can I access the transform of an item's child ?
Like:

ViewPort {

  itemA {
    child1 { transform: [
           Rotation3D {
            id: rotateItem
           }
          ]
       }
    child2 { }
  }

  itemB {

   NumberAnimation {
    target: itemA.children[0].rotateItem // ??
   }
 }

}

I can access properties like x, y etc, but it seems that I can't access the transform...


If they are part of the same component you should be able to access the id directly -- e.g. for the example above you should be able to directly use target: rotateItem. Otherwise, you should be able to use a property alias (http://doc.qt.nokia.com/latest/qml-extending-types.html#property-aliases), as suggested by Daker.

Regards,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110503/36e4868d/attachment.html 


More information about the Qt-qml mailing list