[Interest] [Qt3D] Mixing C++ and QML
Jason H
jhihn at gmx.com
Thu Oct 19 15:44:24 CEST 2017
> I am looking for a way to manage an Entity tree in C++ and the Scene configuration in QML. My C++ code manage entities from a root node and I want to move the Frame graph and camera management,... to qml.
> I can't figure out how to do that because if create a class that derive from QEntity some properties of Entity aren't declared like "components".
>
> My goal is to have an object hierarchy made with QEntity in c++ and dynamic views on it made in QML. Scene views should be dockable,...
This is well-documented. QEntity inherits from QObject so you are good. I'm not sure what you mean by "like components". Public properties, signals and slots are visible to QML. If not it's a simple matter of wrapping them in a public one.
http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html
More information about the Interest
mailing list