Sorry I have to replying to myself once again. :-) Caio and Daker here at the office pointed a mistake in my previous answer.
On Wed, Sep 29, 2010 at 3:52 PM, Eduardo Fleury < [email protected]> wrote: > or else, use a Loader to show it somewhere else: > > Rectangle { > Loader { > delegate: myProperty // assuming this is an initialized property > of type Text > } > } > This is wrong in two ways: 1) The name of the property I intended to say is "sourceComponent", not "delegate". 2) As the name implies, it expects a Component, not a an Item (or Text). You can make "myProperty" of the type "Component" and that will work, but in that case you won't create the Text object yourself, instead will will be defining a Component and creating an instance of Text dynamically using Loader. (See Component and Loader docs for more info). The short answer to make your first item be shown on the screen is to set its parent accordingly by doing: myText1.parent = someOtherItemId See attached example. BR, Eduardo
parentChangeTest.qml
Description: Binary data
_______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml
