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

In QML, adding Behavior to width and height does nothing if item is anchored

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • None
    • 4.7.0
    • None
    • Running Linux and Qt-kinetic repository
      commit: d312514cc37394f24d7cd7d9d6c73435cddb5553
      branch: declarativeui

    Description

      There is an inconsistency, if one adds Behavior to width or height properties, it will only work if the 'width' and 'height' properties are directly changed. If such properties change due to anchorage, Behavior is ignored.

      In the attached example (run with qmlviewer), the inner (yellow) rectangle follows the size of the outter (green) rectangle. Resize the window to see it animating. However, try commenting out "TEST 1" and un-commenting "TEST 2" and it won't work anymore.

      I understand that anchors and width binging may be handled in different ways internally, but IMO this is inconsistent..

      Attachments

        Issue Links

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

          Activity

            People

              w00t Robin Burchell
              fleury Eduardo Fleury
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes