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

Behavior does not work properly with font.pointSize

    XMLWordPrintable

Details

    Description

      In the code below, the pointSize does not change. It will work if font.bold: true is commented out, but it will animate from 13 to 80 instead of 25 to 80.

      import QtQuick 2.0
      
      Item {
          id: main
          height: 640; width: 360
      
          Text {
              id: label
              text: "hello world"
              font.pointSize: 25
      
              Behavior on font.pointSize { NumberAnimation { duration: 2000 } }
          }
      
          states: [
              State {
                  name: "1"
                  PropertyChanges { target: label; font.pointSize: 80; font.bold: true } // Comment font.bold out
              }
          ]
      
          MouseArea {
              anchors.fill: parent
              onClicked: {
                  if (main.state == "")
                      main.state = "1"
                  else
                      main.state = ""
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              bodson Yann Bodson (Inactive)
              bodson Yann Bodson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes