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

QML: Animating the background of a rectangle also animates the border

    XMLWordPrintable

Details

    Description

      In the following example I only want to animate the background, not the border. I feel that I'm quite specific about this in the animation, but it animates the border anyway (unless I put the border in the exclude list)

      import Qt 4.7
      
      Rectangle {
          id: root
          width:300; height:200
          border.width: 50
      
          states: [
              State {
                  when: focus
                  PropertyChanges {
                      target: root
                      color: "brown"
                      border.color: "blue"
                  }
              }
          ]
      
          transitions:
              Transition {
                  ColorAnimation {
                      target: root
      //                exclude: border
                      property: "color"
                      duration: 1000
                  }
              }
      
           MouseArea {
               anchors.fill: parent
               onClicked: root.focus = true
           }
      
      }
      
      

      Attachments

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

        Activity

          People

            brasser Michael Brasser (closed Nokia identity) (Inactive)
            richard Richard Moe Gustavsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes