[Interest] Qt3D: Create custom meshes and textures in C++, use in QML

Oleg Evseev ev.mipt at gmail.com
Thu Jul 6 14:55:36 CEST 2017


> no information about ownership (transfer)

It is same as usual data ownership when mix C++/QML
http://doc.qt.io/qt-5/qtqml-cppintegration-data.html

especially take into account this:
*additionally, the QML engine respects the normal QObject parent ownership
semantics of Qt C++ objects, and will never delete a QObject instance which
has a parent*

> In your World3D constructor you use 8 new command, and I do not know if
some of them are memory leaks or not.

As I think you missed main aspect of Qt3D
https://bugreports.qt.io/browse/QTBUG-58057?focusedCommentId=344161&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-344161



*The thing is everything in Qt3D relies on having a parent, as setting the
parent is what allows the backend aspects to create their nodes and perform
the rendering.*
Everything that is created in my example with "new" (and have parent) will
be in fact deleted with main root entity (World3D) deletion.


After all I agree with you about the lack of documentation of qt 3d :(

---
With regards, Oleg.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170706/4a947574/attachment.html>


More information about the Interest mailing list