Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt 3D Studio - myPresentation.setAttribute and rotation
Forum Updated to NodeBB v4.3 + New Features

Qt 3D Studio - myPresentation.setAttribute and rotation

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 348 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tam.hanna
    wrote on last edited by
    #1

    Hello Folks,
    sorry to make a nuissance of myself - I just updated my Qt 3D Studio to 2.0 to play around with it. Being an old hand, I of course want to start out by setting attributes by hand on the default scene:

    Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
        Slider {
            id: mySlide
            height: 50
            value: 0.7
            width: 600
            onValueChanged: {
                myPresentation.setAttribute("QT-symbol", "rotation.y", mySlide.value*200 );
                myPresentation.setAttribute("DateAndTime", "textstring", mySlide.value*200)
            }
        }
    
        Studio3D{
            anchors.topMargin:50
    
            id: myStudio
            anchors.fill: parent
    
            ViewerSettings {
                scaleMode: ViewerSettings.ScaleModeFill
            }
            Presentation {
                id: myPresentation
                    source: "qrc:/uip/SampleProject.uia"
            }
            onRunningChanged: {
                //myPresentation.goToSlide("Angle",1);
                //myPresentation.setAttribute("Angle.Cluster3D.Cluster.MainGauges.LeftGauge.GaugeNeedle", "rotation.y", 200 );
            }
        }
    }
    

    Running the code on hand causes an odd result. The text shown in the textbox changes, but the rotation of the Logo object which I added does not change. If I use a GaugeNeedle object, setAttribute also does not do anything.

    Could it be that rotation is a special attribute which setAttribute is not allowed to touch?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved