Is there any way to get type information about types of properties defined
in a QML Component?
e.g.
Item {
property color c
property vector3d v
property int i
Component.onCompleted: {
getPropertyType(c) === 'color'
getPropertyType(v) === 'vector3d'
getPropertyType(i) === 'int'
}
}
Details on my usecase: I receive messages over network that decode to JS
objects, but values such as colors and 3d vectors are encoded as simple JS
arrays (e.g. [0.0, 0.5, 1.0]) and direct assignment to the above properties
won't work.
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest