Hi, What do you mean by "get the QDeclarativeContext for child1 through parent"? You can access the (outer) context for any object by using qmlContext(QObject*), but the utility of this is limited as internal, QML created contexts are read-only.
Cheers, Aaron On 29/03/10 7:48 AM, "ext Jinhui Wang" <[email protected]> wrote: Hi, I'm trying out Qt 4.7 QML feature. It is brilliant. One of the feature that nice to have is to get the children for a given QDeclarativeContext. For example, if I have the following QML: import Qt 4.6 Rectangle { id: parent width: 640 height: 480 Rectangle { id: child1 width: 640 height: 240 } Rectangle { id: child2 width: 640 height: 240 } } I'd like to get the QDeclarativeContext for child1 through parent. This would be pretty useful if someone only wants to set context for the child(ren). I'm not sure if this has been already implemented. If so, is that any doc I can follow? Thanks! -Jinhui
_______________________________________________ Qt4-preview-feedback mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
