Important: Please read the Qt Code of Conduct -

Unable to adjust the diffuse color of a 3D model using DataInput in QML

  • Hello everybody.
    I want to adjust the diffuse color of a 3D model imported to a Qt3DStudio project(.uia) via DataInput QML type in a QtQuick project.

    I added the project folder to my .qrc file and I imported the scene successfully using the Presentation QML type.

    I had two data inputs in the Qt3DStudio project:

    • sphereRotation
    • sphereDiffuseColor

    I can successfully adjust the rotation of the 3D sphere via something like this:


    but the following doesn't work:

                value: Qt.vector4d(100 , 200 , 80 , 255)

    The Input type of the data input for sphereDiffuseColor is set automatically to Vector4 in the studio,so I used Qt.vector4d() to match that.And also the Diffuse color property in the Inspector panel has turned orange,so the data input should work.

    There's no specific warning or error message in the program output during runtime.

    What am I missing?

    Thanks in advance.

Log in to reply