Hi all,

for an animation system I try to construct some parameterized QML components that provide access to their transformation and material via properties. The QML part looks the following way:

import Qt3D.Core 2.0
import Qt3D.Render 2.0
import QtQuick 2.0
import Qt3D.Extras 2.0

Entity {
    id: root

    property Transform frame: Transform {}
    property Material mat: PhongMaterial { diffuse: Qt.rgba(0.8, 0.8, 0.8, 1.0) }
...

}

Later I try to update the Transform and Material from C++. But I cannot set the properties via qmlEntity->setProperty("Transform", QVariant(Qt3DCore::QTransform)); because QTransform is not usable as metatype.

How would I do that, or should I use an entirely different approach?


Cheers Volker


--

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to