Make Studio3D component not visible after a slide has finished



  • I'm trying to integrate a simple animation in a QtQuick application. I've loaded the animation using the Studio3D QML type:

    import QtQuick 2.9
    import QtQuick.Window 2.2
    import QtStudio3D 1.0
    
    Window {
        id: window
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
        Studio3D {
            id: studio3D
            anchors.fill: parent
            visible: true
    
            Presentation {
                source: "qrc:/animations/Intro.uia"
            }
        }
    

    Now, I need to know when the slide in the animation has finished playing in order to set:

    studio3D.visible = false
    

    Does anybody know how could I achieve that? Any ideas are appreciated



  • @Camilo Hello,
    Could you please tell me how you dit it ?



  • @LeLev I solved it with a little trick. Since I know the exact duration of the intro animation I added a timer that sets the animation not visible when it's triggered:

    Timer {
            interval: 4500; running: true; repeat: false
            onTriggered: studio3D.visible = false
        }
    

    It's not the prettiest solution but it gets the job done.



  • @Camilo :p That was exactly what I wanted to advise you !
    So there is not a 'real' signal emited when animation is over ?



  • @LeLev Not that I am aware of, so far...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.