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

Tomasz Siekierda sierdzio at gmail.com
Mon Apr 14 15:04:09 CEST 2014


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140414/4103f7a4/attachment.html>


More information about the Interest mailing list