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

Binding loop when binding Button's checkable to its action's checkable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.15.0
    • Quick: Controls 2
    • None
    • Linux/X11

      The following code produces a quite unexpected binding loop warning:

      Button {
          action: Action { }
          checkable: action.checkable || true
      }
      

      (Note that the || true bit can be anything that is different from the Action's checkable value.)

      This seems to happen because when the Button's checkable is evaluated, it updates the action's checkable, which triggers a reevaluation of the binding on checkable.

      I am not entirely sure what the correct solution is here, however to me syncing the checkable state seems rather unexpected and I would expect it to behave like the text or icon properties.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            awhiemstra Arjen Hiemstra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes