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

Add explicit property setter functions that do not break bindings

XMLWordPrintable

    • 70f1732ee (dev), 09587cc89 (6.5), 80723c47a (tqtc/lts-6.2)

      This is a feature request about explicit setter that do not break existing bindings. Suppose we have a currentIndex property binding between a SwipeView and a TabBar. As soon as we set the currenIndex manually, this binding will break, and we would have to repair it via:

          onMyEvent:  {
                     swipeView.currentIndex = newIndex
                     // repair the binding
                     swipeView.currentIndex = Qt.binding(function() { return tabBar.currentIndex } )
                 }
       

      What about we generate a setter that updates the value without breaking the property binding, like this:

       swipeView.setCurrentIndex(newIndex)

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

            qtqmlteam Qt Qml Team User
            kelteseth Elias Steurer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes