Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Configuration type of qml not found in qt 5.15 ?



  • Even after import Qt3D.Core 2.0, Configuration type with which I can use controlledcamera no longer exists in qt 5.15 ?

    import QtQuick 2.5
    import Qt3D.Core 2.0
    import Qt3D.Render 2.0
    import QtQuick.Scene3D 2.0
    import QtQuick.Window 2.2
    import Qt3D.Extras 2.0

    Item {
    Scene3D {
    id: scene3d
    anchors.fill: parent
    aspects: "input"

            Entity {
                id: root
    
                Camera {
                        id: mainCamera
                        projectionType: CameraLens.PerspectiveProjection
                        fieldOfView: 45.0 / 8.0
                        nearPlane:   0.1
                        farPlane:    1000.0
                        viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
                        upVector:   Qt.vector3d( 0.0, 1.0, 0.0 )
                        position: Qt.vector3d( 0.0, 0.0, 10.0 )
                        aspectRatio: scene3d.width / scene3d.height
               }
                Configuration{
                    
                }
                
                Mesh {
                    id: myMesh
                    source: "qrc:/models/waterPlane.obj"
                }
                
                PhongMaterial {
                    id: myMaterial
                    ambient: Qt.rgba( 0.3, 0.3, 0.3, 1.0 )
                    diffuse: Qt.rgba( 0.7, 0.7, 0.7, 1.0 )
                }
    
                Entity {
                    id: myEntity
                    components: [ myMesh, myMaterial ]
                }
            }
        }
    

    }


  • Moderators

    No such component exists https://doc.qt.io/qt-5/qt3d-qml.html. I've checked 5.14 and 5.12 and it's not there either. Are you sure such component has ever existed?



  • @sierdzio Thank you for your answer.
    It's here but I don't know if it's still supported by qt 5.15
    https://doc.qt.io/archives/qt-5.6/qml-qt3d-core-configuration.html, I'm trying to load a .obj 3d file using qml and display it, do you have any knowledge on how to do that? any example of code?


  • Moderators

    Isn't it the same as just Camera?

    As for .obj: looks like Mesh is the way to go.

    I can't help much more, I have never used Qt3D.


Log in to reply