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

Investigate semantics of binding properties that can change its value outside QML

    XMLWordPrintable

Details

    • All

    Description

      We don't seem to have a overarching design or clear semantics of what happens when a property is changed outside of QML, and that property has a binding on the QML side.

      For example, the x property of a Window can be bound to e.g. x: foo but the window may be moved via the window manager/user as well, even if foo hasn't changed.

      One option would be to break the binding when this happens, but we don't do this today. So the binding is still active, and if {{foo }}does change, the window jumps back to the bound position.

      Alternatively we could ensure the binding is always applied, even when the underlying value changes, but I would assume most people who declare {{x: 100 }}are thinking of it as the window's initial position – not that it should be locked to 100 always.

      This is not limited to x/y/width/height of Window, but is one example of where QML has to also react to the underlying object it's "managing" changing under it.

      We should look into how other declarative toolkits (on native platforms) handle this.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            vestbo Tor Arne Vestbø
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes