Now let's see how we can perform the opposite task. This approach is useful if your application is built mainly around Qt Quick. This means that you use the QQmlApplicationEngine class in the main() function, and the root object of your main.qml file is usually the Window object. It's very easy to extend your Qt Quick application with a bit of 3D action.
We could place all the code into the main.qml file, but it's more convenient to split it because setting up a 3D scene requires quite a bit of code. Let's say you have a file named My3DScene.qml that contains the usual content of a 3D scene:
Entity { components: [ RenderSettings { activeFrameGraph: ForwardRenderer { /*...*/ }, InputSettings {} ...