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

No consistent way to refer to model data within a delegate

    XMLWordPrintable

Details

    • e9f650cad82e7eff2234cdf2d37bb9b1bb25d27d

    Description

      Model data can be provided to QML views in many forms: a ListModel, a custom QAbstractListModel-derived class, QObjectList, a JS array, etc.

      Currently, a delegate must know which of these types of models is going to being used, as there isn't a unified way of working with collections of data. For example, with ListModel the delegate would need to use model.someData, while for a JS array of objects it would need to use modelData.someData (QTBUG-49983).

      This is unintuitive, and means that models aren't easily interchangeable: for example if one type of model is used for simulation/prototyping, and another for production code.

      Attachments

        Issue Links

          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
              mbrasser Michael Brasser
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes