[Qt-qml] Accessing dynamic properties
jamey.hicks at nokia.com
jamey.hicks at nokia.com
Tue Sep 14 17:29:46 CEST 2010
If variable o is bound to your object, then this will do the trick:
o.foo
To update it:
o.foo = newvalue;
Anecdotal evidence suggests that you cannot assign new dynamic properties to your object from QML.
Jamey
On Sep 14, 2010, at 11:16 AM, ext denis.dzyubenko at nokia.com wrote:
> Hi,
>
> Is there a way to access dynamic properties from QML? I have a c++ object that does _not_ have a Q_PROPERTY(int foo READ foo), and in c++ I set the value using the setProperty("foo", 42) function call - i.e. a dynamic property.
>
> Is there a way to access it from QML? I assume that by default declarative doesn't bother to access then for performance reasons, but is there a way to enforce it and ask for the value of such property?
>
> Denis.
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list