How do I use the QML 3D Model type?
- 
This is something that I really want to use, but how do I define the model itself. I mean how do I create an instance of the 3D Model. I tried to use this code that I copied
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick3D 1.15 import QtQuick3D.Materials 1.15 import QtQuick3D.Effects 1.15 import QtQuick3D.Helpers 1.15 Window { id: window visible: true width: 1280 height: 720 // Viewport for 3D content View3D { id: view anchors.fill: parent // Scene to view Node { id: scene Light { id: directionalLight } Camera { id: camera // It's important that your camera is not inside // your model so move it back along the z axis // The Camera is implicitly facing up the z axis, // so we should be looking towards (0, 0, 0) z: -600 } Model { id: cubeModel // #Cube is one of the "built-in" primitive meshes // Other Options are: // #Cone, #Sphere, #Cylinder, #Rectangle source: "#Cube" // When using a Model, it is not enough to have a // mesh source (ie "#Cube") // You also need to define what material to shade // the mesh with. A Model can be built up of // multiple sub-meshes, so each mesh needs its own materials: [ DefaultMaterial { // We are using the DefaultMaterial which // dynamically generates a shader based on what // properties are set. This means you don't // need to write any shader code yourself. // In this case we just want the cube to have // a red diffuse color. id: cubeMaterial diffuseColor: "red" } ] } } } }When I run it I get the error: QQmlApplicationEngine failed to load component
<Unknown File>:20:7: Light is Abstract