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

Sorting after changing a QTableView's header

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes