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

Helmut Mülner helmut.muelner at gmail.com
Thu Jul 6 14:34:32 CEST 2017


Hi Oleg,

> This is basically the same approach as in the Stackoverflow answer

That's why I wrote "I'm not sure I understand your problem in a right way" before. Why is this approach not suitable for you?

(just in case, in difference with StackOverflow approach in my example camera and render settings are done in backend in C++)


> It would be nice if the Qt3D developers could add one or more applications of mixed C++/QML Qt3D development to the Qt3D example collection. Life would be so much easier.

After all there there are many articles and examples about mixed C++/QML, I didn't see any uniqueness of Qt3D in this questions.
And after understanding this simple approach with qmlRegisterType you can use any Qt3D example with c++ backend, why not?

 

I understand mixed C++/QML programming, I have done some big QML applications with a C++ backend.

 

The approach with qmlRegisterType has the problem that the object is created by QML and lives in QML space, forcing me to transfer some of the workflow logic to QML, making testing and separating GUI and backend more difficult.

 

What makes mixing QML and C++ harder in Qt3d is probably only the lack of decent documentation, e.g. no information about ownership (transfer). In your World3D constructor you use 8 new command, and I do not know if some of them are memory leaks or not. And I did not know the QCameraSelector class and had a look at the documentation: “Class to allow for selection of camera to be used

A Qt3DRender::QCameraSelector can be used to select the camera, which is used by the FrameGraph when drawing the entities.” ??

 

Cheers,

Helmut

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170706/5e8b48d5/attachment.html>


More information about the Interest mailing list