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

Feature Request: make HorizontalHeaderView with QAbstractItemModel

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.15.0
    • Quick: Controls 2
    • None

    Description

      As mentioned in https://doc-snapshots.qt.io/qt5-dev/qml-qtquick-controls2-horizontalheaderview.html#model-prop, If model is a QAbstractItemModel , headerData() will not be accessed. But it is better if HeaderView works with QAbstractItemModel too.

      for instance, if the user has something like:

      TableModel* myModel = new TableModel();
      QSortFilterProxyModel* proxyModel = new QSortFilterProxyModel;
      proxyModel->setSourceModel(myModel);
      engine.rootContext()->setContextProperty("tableModel", proxyModel);
      

      If using a ProxyModel it does no longer refer to headerData() but uses data() instead.

      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
              shmittal Shveta Mittal (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes