Thanks René,
I tried that already (but unfortunately didn't mention it), but
Qt3DCore::QTransform is derived from QNode and therefore implicitly from
QObject so it is missing the copy constructor that is needed for the
registration as metatype.
Cheers Volker
Am 30/08/2017 um 10:40 schrieb René Hansen:
Try to register Qt3DCore::QTransform as a metatype in your main():
qRegisterMetaType<Qt3DCore::QTransform>("Qt3DCore::QTransform");
http://doc.qt.io/qt-5/qmetatype.html#qRegisterMetaType
On Wed, 30 Aug 2017 at 10:16 Volker Enderlein
<volker.enderl...@ifm-chemnitz.de
<mailto:volker.enderl...@ifm-chemnitz.de>> wrote:
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 <mailto:Interest@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest
--
Volker Enderlein Institut für Mechatronik e.V.
Phone: +49 (0)371 531 19651 Reichenhainer Strasse 88
Fax: +49 (0)371 531 19699 D-09126 Chemnitz
Mail: volker.enderl...@ifm-chemnitz.de www.ifm-chemnitz.de
Vorstand:
Prof. Dr.-Ing. Welf-Guntram Drossel (Vorsitz)
Dipl.-Ing. Heiko Freudenberg (Geschäftsführer)
Amtsgericht Chemnitz VR 713
Ust.-IdNr. DE 159285348
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest