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

Make "rect" basic type left, right, top, bottom writable

XMLWordPrintable

      QML basic type rect has properties for left, right, top, bottom corresponding to the respective QRect or QRectF properties.

      While the properties are documented as "read-only", writing to them produces no runtime error whatsoever leaving you wonder why it's not working.

      I think those values should be writable from QML, so you can save yourself some client-side logic when you just want to move one of the edges of a rectangle without having to manually alter its size afterwards.

      However, this could lead to people doing stupid things like

      Foo {
          size.x: 100
          size.left: 150
      } 

      If adding this isn't desirable, then at least it should throw a TypeError like it normally does when trying to assign to a read-only property

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

            qtqmlteam Qt Qml Team User
            broulik Kai Uwe Broulik
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes