Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50908

Animators in StackView transitions don't seem to work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.1
    • 5.6.0
    • Quick: Controls 2
    • None
    • qtdeclarative: 084dbb06d7b00c4a67edb6ce58956150036c35f2

    Description

      I would expect the items below to have their opacity animated as they appear/disappear, but they don't.

      import QtQuick 2.4
      import QtQuick.Window 2.0
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          id: root
          width: 480
          height: 320
          visible: true
      
          StackView {
              id: stackView
              initialItem: redRectComponent
              anchors.fill: parent
      
              Transition {
                  id: enterTransition
      
                  OpacityAnimator {
                      from: 0
                      to: 1
                      duration: 1000
                      easing.type: Easing.OutCubic
                  }
              }
      
              Transition {
                  id: exitTransition
      
                  OpacityAnimator {
                      from: 1
                      to: 0
                      duration: 1000
                      easing.type: Easing.OutCubic
                  }
              }
      
              pushEnter: enterTransition
              pushExit: exitTransition
              popEnter : enterTransition
              popExit : exitTransition
              replaceEnter : enterTransition
              replaceExit : exitTransition
          }
      
          Component {
              id: redRectComponent
      
              Rectangle {
                  id: redRect
                  color: "red"
      
                  MouseArea {
                      anchors.fill: parent
                      onClicked: stackView.push(greenRectComponent)
                  }
              }
          }
      
          Component {
              id: greenRectComponent
      
              Rectangle {
                  id: greenRect
                  color: "green"
              }
          }
      }
      

      Meow!

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            mitch_curtis Mitch Curtis
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes