[Qt-qml] Loader: How to "unset" the sourceComponent ?

Martin Jones martin.jones at nokia.com
Tue Apr 20 01:19:09 CEST 2010


On Tue, 20 Apr 2010 12:08:04 am ext Eduardo Fleury wrote:
> On Sat, Apr 17, 2010 at 5:40 AM,
> <Nigel.Hietala at nokia.com<mailto:Nigel.Hietala at nokia.com>> wrote: You set
> it to "".
> e.g. Loader {
>       sourceComponent: myCondition ? myComponent : ""
> }
> I cannot do that, sourceComponent expects a QDeclarativeComponent*, not a
> QString.
> 
> 
> fleury guararapes tmp $ qml teste2.qml
> Wall startup time: 9
> file:///home/fleury/tmp/teste2.qml:22: Unable to assign QString to
> QDeclarativeComponent*

We need to allow:

Loader {
      sourceComponent: myCondition ? myComponent : undefined
}

Will do this today.

-- 
Martin



More information about the Qt-qml mailing list