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

Add explicit property setter functions that do not break bindings

    XMLWordPrintable

Details

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

    Description

      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)

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-109996
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes