[Qt-qml] Loading external QML files

Ben Marinic ben at combinationstudios.com
Tue Jul 27 18:13:16 CEST 2010


Thank you Gregory.  My newbie questions continue.  Where in the docs  
should I look regarding custom events?  Can I add a listener to the  
loader instance which is listening for a custom event triggered by the  
child QML file?  In my example a mouse event from the child QML file  
needs to bubble up to the parent QML file which will handle the  
event.  In the event I would like to have a few custom properties.

Thanks
Ben


On 27 Jul 2010, at 11:59, Gregory Schlomoff wrote:

> You're looking for the Loader element :)
> Have a look at the doc:
> http://doc.trolltech.com/main-snapshot/qdeclarativeelements.html
>
>
> On Tue, Jul 27, 2010 at 5:53 PM, Ben Marinic <ben at combinationstudios.com 
> > wrote:
>> Hi
>>
>> I'm new to QML - having used Flex for many years. Is there a way  
>> for a QML
>> file to load another QML file on demand? Something like the way an  
>> image can
>> be loaded - passing in the image location into the source property.  
>> I looked
>> at the File class but can't quite figure out how to implement it  
>> for my
>> situation. I have button and need to load a particular QML file.  I  
>> guess
>> this would be the equivalent of a Flash SWF loading another SWF (if  
>> you are
>> familiar with Flash).
>>
>> Thanks for your help.
>> Ben
>> Ben Marinic
>> Combination Studios Ltd
>> e. ben at combinationstudios.com
>> t. +44 (0)20 7193 2000
>> m. +44 (0)7813 147 159
>>
>>
>>
>>
>>
>> _______________________________________________
>> Qt-qml mailing list
>> Qt-qml at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-qml
>>
>>

Ben Marinic
Combination Studios Ltd
e. ben at combinationstudios.com
t. +44 (0)20 7193 2000
m. +44 (0)7813 147 159





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100727/3f2e64d2/attachment.html 


More information about the Qt-qml mailing list