Hi,
> No it doesn't work, and no its not supposed to work. Qt's dynamic
> properties do not fit the QML model very well which relies on knowing the
> complete static type of an object prior to instantiation, and we'd prefer
> not to support them.
it sounds a bit strange to me, but if it is a conscious decision they I can
live with that.
Though it would be convenient to get access to dynamic properties if the user
explicitly asks for them in QML - for example it would be convenient to have
something like that in QML;
MyQMLItem {
Item {
width: parent.dynamicProperty("my_dynamic_property") // mark explicitly
that we want a dynamic property
}
}
> Perhaps if you give more details about the actual problem you are trying to
> solve we can think of an alternative way.
It is mostly for prototyping in the QML Gestures project - we would want to
expose new properties for QML on objects inside QtGui but we are not sure if we
want to have them in the final version. Of course we could use
Q_PRIVATE_PROPERTY, but for that we need to modify Qt gui itself. Right now our
research code is in the qml import module - so it would be much more convenient
if we could set some properties on objects in Qt from inside the qml plugin,
and them access them from the qml document without creating wrappers in the qml
module.
--
Denis Dzyubenko
Software Engineer
Nokia, Qt Software
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml