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

easing.type: Easing.Bezier last value isn't the "to" value

    XMLWordPrintable

Details

    • All
    • c54083ff933830a28f43551b9c3b132bfb11492d (qt/qtbase/5.15)

    Description

      Please check the code bellow:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Controls 2.12
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Column {
              Text {
                  id: t
                  text: "Hello World"
                  height: 0
                  renderType: Text.NativeRendering
      
                  onHeightChanged: console.log("Height: ", height)
      
                  Behavior on height {
                      NumberAnimation {
                          duration: 250
                          easing.type: Easing.Bezier
                          easing.bezierCurve: [ 0.4, 0, 0.2, 1, 1, 1]
                      }
                  }
              }
              
              TextInput {
                  text: "Break me"
                  renderType: Text.NativeRendering
                  font.pixelSize: 24
              }
      
              Button {
                  text: "Break it"
                  onClicked: t.height += 48
              }
          }
      }
      

      Expected last log would be: qml: Height: 48
      But it is: qml: Height: 47.99999999505308

      Attachments

        Issue Links

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

          Activity

            People

              vgt Eirik Aavitsland
              karimpinter Karim Pinter (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes