On 13/08/2010, at 3:38 PM, ext
[email protected]<mailto:[email protected]> wrote:
On 08/13/2010 04:31 AM, Brasser Michael (Nokia-MS-Qt/Brisbane) wrote:
note that there aren't any Item-level notifications for this type of thing from
QML, only Component-level
Component.onCompleted works for any QML Item.
e.g.
import Qt 4.7
Rectangle {
width: 200
height: 200
Text {
x: 66
y: 93
text: "Hello World"
Component.onCompleted: console.log ("Hello World completed!")
}
Component.onCompleted: console.log ("App completed")
}
outputs:
App completed
Hello World completed!
- Tapani
P.S: in this particular case I find the ordering a bit strange
To (hopefully) clarify, Component.onCompleted can be attached to any object,
but it only reports on component completion -- for the example above both are
triggered at the same time when the entire component has finished being
created/initiialized. Within a component, they are run in an 'undefined' order.
Regards,
Michael
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml