[Qt-qml] JavaScript QML object properties

aaron.kennedy at nokia.com aaron.kennedy at nokia.com
Mon Nov 22 11:02:04 CET 2010


Hi,

This is not expected behavior.  Please create a bug report (with an example).

Cheers,

Aaron

On 22/11/2010, at 7:09 PM, "Iliev Ivailo (EXT-ProData/Berlin)" <ext-ivailo.iliev at nokia.com<mailto:ext-ivailo.iliev at nokia.com>> wrote:

 Hi,

I want to play with QML object from within JavaScript. Everything is ok until you try to change property of QML object that is not explicitly set in the QML file. Then you have error:

example

Rectangle {
id: test

}

and then in the JS file you have test.visibile = false

So you have error that visible is not accessible.

BUT if you put:

Rectangle {
id:test
visible:true
}

then you can change visible to false from the JS

So my question is: is it required to set all properties once with QML so you can modify them later with JS or it's a problem temporary and will change. Or maybe there is something wrong in my environment - maybe I'm using old version or something else in the QML file causes this problem?

Best Regards,
Ivo
_______________________________________________
Qt-qml mailing list
Qt-qml at trolltech.com<mailto:Qt-qml at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-qml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101122/769af415/attachment.html 


More information about the Qt-qml mailing list