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

No consistent way to refer to model data within a delegate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.0
    • Fix Version/s: None
    • Labels:
      None

      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

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

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes