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

Slider breaks bond with object properties when dynamically loaded

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: Quick: Controls 2
    • Labels:
      None
    • Platform/s:
      All

      Description

      Steps to reproduce:

      • Load a Slider element with Loader and bind a QObject/QtObject property using Binding component
      • Bind Slider's value property to the bound object's value property

      Result:

      • Slider's value is changed to zero, then changed again to 1 or to the from property (whichever is lower), therefore breaking the bound. It seems like value is first bound, with from and to initially set to 0, resulting in value being changed to 0. Then from and to are bound, changing the value to 1 or from.

      Expected result:

      • Slider's value property should remain bound to the passed object's value property when value is within bounds from and to. In other words, the to and from properties should be bound first, and only then the value property should be correctly bound.

      Please see attachments for an example

        Attachments

        1. ConfigElement.qml
          0.4 kB
        2. ConfigObject.qml
          0.1 kB
        3. main.qml
          0.5 kB
        4. NumericalElement.qml
          1 kB
        5. qtbug-89202.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            mmi_puya Puya Daravi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes