Re: [Interest] Qt3D/QML How to access a QTransform based property from C++

2017-08-30 Thread Volker Enderlein
Thanks Guiseppe, I try to come up with a solution based on your and Sean's answer. Cheers Volker Am 30/08/2017 um 11:29 schrieb Giuseppe D'Angelo: Il 30/08/2017 10:07, Volker Enderlein ha scritto: Entity {   id: root   property Transform frame: Transform {}   property Material ma

Re: [Interest] Qt3D/QML How to access a QTransform based property from C++

2017-08-30 Thread Sean Harmer
Set the properties on the QTransform, not the QTransform itself. But in general don't poke up into the QML layer from C++. Much better idea to bind the transform in QML to properties on an object you export from C++ to QML. i.e. Entity { components: [ Transform { transla

Re: [Interest] Qt3D/QML How to access a QTransform based property from C++

2017-08-30 Thread Giuseppe D'Angelo
Il 30/08/2017 10:07, Volker Enderlein ha scritto: 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 prope

Re: [Interest] Qt3D/QML How to access a QTransform based property from C++

2017-08-30 Thread Volker Enderlein
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 R

Re: [Interest] Qt3D/QML How to access a QTransform based property from C++

2017-08-30 Thread René Hansen
Try to register Qt3DCore::QTransform as a metatype in your main(): qRegisterMetaType("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> wrote: > Hi all, > > for an animation system I t

[Interest] Qt3D/QML How to access a QTransform based property from C++

2017-08-30 Thread Volker Enderlein
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 {