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

The delegate object in the Listview for DelegateModel with DelegateChoice is not being updated on role value change in the model

    XMLWordPrintable

    Details

    • Platform/s:
      Windows

      Description

      In my program, I need to build the ListView with the dynamic delegates. Before the DelegateChooser, I used Loaders, but when DelegateChooser was introduced I thought it might be a cleaner way to accomplish my goals. But now I bumped into this problem and can't figure out whether it is correct behavior or it is a bug. So the situation is:

      When item in the model of the DelegateModel is changing its role value, the DelegateChooser do not get notified about it. So the ListView is not triggering re-rendering and nothing changes except bindings the Delegate (which is notified correctly). Also, when the delegate is out of ListView's cache and destroyed, it is correctly processed with the DelegateChooser when it comes back and renders the needed delegate.

      See attached QT project and GIF

        Attachments

        1. image-2019-05-17-12-10-17-560.png
          1.23 MB
          Egor Shchavelev
        2. test_listview_chooser.zip
          3 kB
          Egor Shchavelev

          Issue Links

          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:
              gooldan Egor Shchavelev
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes