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

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

    XMLWordPrintable

Details

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

    Description

      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.

      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
            awhiemstra Arjen Hiemstra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes