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

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

XMLWordPrintable

    • All
    • c54083ff933830a28f43551b9c3b132bfb11492d (qt/qtbase/5.15)

      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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes