[Interest] [QtQuick][Strict] Getting property of QtObject in two different places of program

Kakadu kakadu.hafanana at gmail.com
Tue Apr 15 13:00:20 CEST 2014


Tomasz,

It is not the option because my javascript is autogenerated.

Cheers

On Mon, Apr 14, 2014 at 5:04 PM, Tomasz Siekierda <sierdzio at gmail.com> wrote:
>
> On 11 Apr 2014 13:38, "Kakadu" <kakadu.hafanana at gmail.com> wrote:
>>
>> Hi
>>
>> I have an issue with accessing property of my QtObject. When I do it
>> in Component.onCompleted slot all is fine: eval('images.city1') and
>> eval('images').city1 work the same (for enabled and disabled strict
>> mode).
>>
>> But when I do the same code in some function eval('images') returns
>> the same QtObject, eval('images1').city works as expected but
>> eval('images.city1') returns undefined.
>>
>> Any ideas what is happening?
>>
>> My code is here: https://gist.github.com/Kakadu/10353353/
>>
>>
>> Best wishes,
>> Kakadu
>>
>
> QObjects are available without using 'eval', QML and JS engines understand
> them as they are.  Just use images.city1.



More information about the Interest mailing list