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

QSortFilterProxyModel columnCount() reimplementation issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • 4.8.x
    • 4.6.3
    • Widgets: Itemviews
    • None

    Description

      QSortFilterProxyModel uses columnCount() from sourceModel() instead of its own columnCount() implementation.

      This becomes an issue when the sourceModel()'s columnCount() returns a smaller number then the QSortFilterProxyModel's columnCount(). This issue happens only with data(). headerData() works as expected. This results in a table having the correct number of columns but empty cells.

      The other way round (sourceModel()->columnCount() > columnCount()) it is basically the same issue, but because the headerData() works correctly, the issue is "invisible".

      Attached you'll find a zip archive, containing a sample project demonstrating the issue. Check BaseModel::rowCount()'s comments for fastest start-up.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            mzanetti Michael Zanetti
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes