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

Sorting after changing a QTableView's header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.0
    • 4.4.3
    • Widgets: Itemviews
    • None
    • 6420f43f30e2d5cf7ae74702f96c176d7bf22a84

    Description

      With a QTableView, setting SortingEnabled to true, followed by
      setHorizontalHeader(...) leads to SortingEnabled to still be set to true, but it is not able to be sorted.

      QTableView::setHorizontalHeader() connects various signals from the new header (sectionResized(), sectionMoved() etc.) to internal slots but does not connect QHeaderView::sortIndicatorChanged() to QTableView::sortByColumn() if sorting has been enabled on the table view earlier by calling setSortingEnabled(true). This has the effect of breaking sorting in the table.

      Attachments

        Issue Links

          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)
              janichol Andy Nichols
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes