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

QTreeView::sortByColumn(-1) broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.13.0
    • Widgets: Itemviews
    • None
    • Linux/X11
    • de26ea6a7ff921995b6229f1f683821adb95e973

      Due to the deprecation warning for sortByColumn(int column) i was shocked to notice that sortByColumn(-1, Qt::AscendingOrder) doesn’t restore the natural order of my model anymore – the call seems to be ignored completely.

      While trying to workaround that, i noticed that setSortingEnabled(false); also doesn’t reset to an unsorted state either. However it disabled the sort indicators and seems to set setSectionsClickable(false) which prevents any QHeaderView::sectionClicked signals from getting triggered.

      It continues to sort new data even when the complete model is reset.

      I implemented this manually using QHeaderView::sortIndicatorChanged, which is completely broken and potentially unfixable now.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            darklighter Norbert Pfeiler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes