Check out an old thread in this mailing list for a possible workaround: http://www.mail-archive.com/qt-qml@trolltech.com/msg00738.html
Summary: There is Binding -item in QML and there is also Qt.createQmlObject -method to dynamically create QML Items. So it is possible to create a Binding -item dynamically. And Binding -item creates a binding! The problem in that thread was to set a binding to a dynamically created item. It was solved by also creating a Binding -item dynamically. I have not tried how this would work, if there already would exist a binding that you would like to change e.g. due to reparenting. - Tapani On 26.10.2010 03:08, ext michael.bras...@nokia.com wrote: > Hi, > > On 24/10/2010, at 12:49 AM, ext Charley Bay wrote: > >> The QML docs state: >> >>> Property bindings are the most common use of JavaScript in QML. >>> Property bindings associate the result of a JavaScript expression >>> with a property of an object. >> >> ...found at: >> >> <http://doc.qt.nokia.com/4.7/qdeclarativescope.html> >> >> IMHO, this is one of the most pivotal concepts in QML. >> >> However, I'm trying to figure out how to *set* such a binding >> *within* javascript. Can this be done? > > There is currently no API for establishing a binding from within javascript > (PropertyChanges is currently the only way to set a binding > "after-the-fact"). Would you mind adding a suggestion for this via the task > tracker (http://bugreports.qt.nokia.com)? > > Regards, > Michael > > > _______________________________________________ > Qt-qml mailing list > Qt-qml@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-qml _______________________________________________ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml