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

NumberAnimation on enter/exit of Menu is not working with negative starting value

    XMLWordPrintable

Details

    Description

      Please refer to the attached sample, Animation on 'x' with starting value a negative number, it is not working.

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      
      ApplicationWindow {
          id: app
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Column {
              anchors.centerIn: parent
              spacing: 20
              Button {
                  text: "Open"
                  onClicked: menu.open()
      
              }
              Button {
                  text: "Close"
                  onClicked: menu.close()
              }
          }
      
          Menu {
              id: menu
              height: app.height
      
              enter: Transition {
                  NumberAnimation { property: "x"; from: -200; to: 0;duration: 5000 ;easing.type: Easing.OutQuad }
              }
              exit: Transition {
                  NumberAnimation { property: "x"; from: 0; to: -200;duration: 5000 ;easing.type: Easing.InQuad }
              }
      
              MenuItem {
                  text: "some text 1"
              }
              MenuItem {
                  text: "some text 2"
              }
              MenuItem {
                  text: "some text 3"
              }
          }
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            shmittal Shveta Mittal (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes