[Qt-qml] Accessing resources of item loaded using Loader.

Rakesh.Mutharaju at tieto.com Rakesh.Mutharaju at tieto.com
Wed May 12 08:01:08 CEST 2010


Hi,

      I have tried the pageloader.item.running = true , I get the same error "Cannot assign to non-existent property "running".

FYI; My \\Test1.qml<file://\\Test1.qml> file is simple

Item{
        id: test1Itemid
        width: 50
        height: 50
     Text{
            id: textItemid
            text: "test timer"
            }

resources:[
Timer{
            id:statustimer
            interval: 1000; running: false; repeat: true;
            onTriggered: {
                        textItemid.text = "timer expired"
                    }
    }
]

}

How to set the statustimer as runnining, if this .qml file is loaded by test.qml loader "pageloader".

With best regards,
Rakesh.M

________________________________
From: qt-qml-bounces at trolltech.com [mailto:qt-qml-bounces at trolltech.com] On Behalf Of Rakesh.Mutharaju at tieto.com
Sent: Tuesday, May 11, 2010 10:11 AM
To: qt-qml at trolltech.com
Subject: [Qt-qml] Accessing resources of item loaded using Loader.

Hi,

      How to access resources of Item say \\ Test1.qml using Loader{id: pageloader; source: "Test1.qml} \\ test.qml file.

I have a timer in resources of the Item and I want to set "running = true"

I tried pageloader.resources[0].running = true -->>> error message: invalid property "running" and also pageloader.item.resources[0].running = true -->> No error , but nothing happens as noticed in the documentation that Item [Read only]. Neither of them serve the purpose.


Thanks and Regards,
Rakesh


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100512/5b34e79f/attachment.html 


More information about the Qt-qml mailing list