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

QHeaderView: sectionPressed() and sectionClicked() are emitted with different values when columns are hidden and the model is a QSortFilterProxyModel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.1
    • Widgets: Itemviews
    • None
    • 188c2ef11e92d04dcf334309c85a7f1b14945aaa

    Description

      QHeaderView: sectionPressed() and sectionClicked() are emitted with different values when columns are hidden and the model is a QSortFilterProxyModel. The attached example reproduces this problem.

      The attached patch addresses the problem since logicalIndexAt() was called twice in this case which exposed the issue, but doesn't solve the reason why it appeared to have changed in this case.

      Attachments

        1. main.cpp
          3 kB
        2. main.h
          0.4 kB
        3. patch.diff
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            anshaw Andy Shaw (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes