0
votes

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.

1

1 Answers

0
votes

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/