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

It should be documented that a QML Rectangle::border.width does not affect Rectangle geometry or anchor margins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.7.2
    • 4.7.1
    • Documentation
    • None
    • 9743d1ae8dcec6b64bf497e76bd49a029c8f3ecc

      It should be documented that a Rectangle::border.width does not affect Rectangle geometry or anchor margins. In the case of the example below, the blue rectangle which is anchored to to right edge of the rectangle with increasing border - the blue rectangle stays in place;

      import Qt 4.7
      
      Rectangle {
          id: screen
          width: 400
          height: 200
          Item {
              width: childrenRect.width
              height: childrenRect.height
              anchors.centerIn: parent
              Rectangle {
                  id: borderRect
                  height: parent.height
                  width: 50
      
                  NumberAnimation on border.width {
                      from: 0; to: 10
                      duration: 10000
                  }
              }
              Rectangle {
                  anchors.verticalCenter: borderRect.verticalCenter
                  anchors.left: borderRect.right
                  color: "blue"
                  width: 50; height: 50
              }
          }
      }
      

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

            boddie David Boddie (Inactive)
            hhartz Henrik Hartz (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes