Adding 3D Views
To create a Qt Quick 3D UI project, we recommend using a Qt Quick 3D Application Template wizard template that imports the Qt Quick 3D QML types to the QML Types tab in Library and contains a 3D view. A 3D view type includes a scene environment as well as a scene light, camera, and model. A default material is attached to the model. You can attach textures to materials. For more information about creating projects, see Creating Projects.
To add a 3D view to some other kind of project and to display the Qt Quick 3D QML types in Library, select Library > QML Imports > Add Import > QtQuick3D.
After importing the Qt Quick 3D QML types, drag and drop a View3D type to Navigator or to Form Editor.
By default, a directional light and a perspective camera are used in a 3D scene created by using the wizard template mentioned above. To use other light and camera types, select the component in 3D Editor or Navigator and change the type of the component in the Type field in Properties. For example, to use a point light, enter PointLight.
Similarly to other components, you can select a 3D view in Navigator or 3D Editor and modify its property values in the Properties view. Use the properties in the View3D tab to set some properties specific to a 3D view component.
The Camera property defines which camera is used to render the scene to Form Editor. If this property is not defined, the first enabled camera in the scene will be used.
The Environment property specifies the Scene Environment used to render the scene. By default, the first Scene Environment in the scene is set as the property value.
The Import Scene property defines the ID of the component to render to Form Editor. The component does not have to be a child of a 3D view type. This referenced component becomes a sibling to child items of a 3D view, if there are any. You can use this property, for example, to create a split screen view showing your scene from multiple cameras. For more information on how to to use a 3D view to show a scene from multiple cameras, see Qt Quick 3D - View3D Example.
Note: The Import Scene property can only be set once. Subsequent changes will have no effect.
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.