QDeclarativeItem modify anchor from C++
-
Greetings and HNY,
Is there a way to modify or disable a QDeclarativeItem's anchor from the C++ code ?
Thanks.
-
Is "this":http://bugreports.qt.nokia.com/browse/QTBUG-9677 what you are looking for.
-
Try using QDeclarativeProperty and QDeclarativeExpression.
For example, to set an object's 'anchors.bottom' to 'parent.bottom':
@
QDeclarativeContext *context = ...
QObject *myObject = ...QDeclarativeExpression expr(context, myObject, "parent.bottom");
QDeclarativeProperty prop(myObject, "anchors.bottom");
prop.write(expr.evaluate());
@ -
@blam: Thanks man.