0

I reference pullmybeard to work on drag and drop effect.

To do something programmatically, I would use cpp rather than QML itself.

But I face problem in setting property variables. Here is my code segments:

Container *playerContainer = Container::create();
           playerContainer->setLayout(new AbsoluteLayout);
           playerContainer->setLayoutProperties(AbsoluteLayoutProperties::create().x(posX).y(posY));`

I would set a variables to this playerContainer in order to store positionX and Y. Like pullmybeard, inside ImageView id:beard, it sets property real dy. So, it can be used in onTouch hander.

animuson
  • 53,861
  • 28
  • 137
  • 147
Vincent
  • 33
  • 4

1 Answers1

0

I think you are looking for a way to pass attributes from your C++ to your QML.
To do that, you can use setContextProperty("propertyName", property)
You can have a look there to see how to implement it : http://developer.blackberry.com/cascades/documentation/dev/integrating_cpp_qml/

user3660803
  • 315
  • 1
  • 3
  • 15
nicolas
  • 234
  • 4
  • 11