Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to use headerData as Model for HorizontalHeaderView if used with a QSortFilterProxyModel
Forum Updated to NodeBB v4.3 + New Features

How to use headerData as Model for HorizontalHeaderView if used with a QSortFilterProxyModel

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 235 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maxwell31
    wrote on last edited by
    #1

    Hi,

    If I have a QAbstractTableModel and filter it with a QSortFilterProxyModel, the HeaderViews for the TableView don't take the headerData as a model for the data: https://doc-snapshots.qt.io/qt6-dev/qml-qtquick-controls2-horizontalheaderview.html

    see also: https://forum.qt.io/topic/120622/horizontalheaderview-with-qsortfilterproxymodel

    The HorizontalHeaderView can also be assigned its own model. How can I create a model of the headerData of my QSortFilterProxyModel so I can supply it to HorizontalHeaderView?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      maxwell31
      wrote on last edited by
      #2

      Hm, actually it seems that it is working as intended in 5.15.1 but not so in 5.15.0

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved