qt5base-lts/tests/auto/widgets/itemviews
Giuseppe D'Angelo d982fdfca4 QHeaderView: allow un-sorting of models
If one clicks on a QHeaderView's section, the header view will
sort the view by the respective column/row. By clicking multiple
times, one is able to toggle the sorting between ascending
and descending. Something that is NOT possible to do however is to
un-sort the view -- that is, to restore the model's original
sorting. This must be done via code, by asking the header or the
view to sort by section -1.

This commit adds new property to QHeaderView to make it possible
to unsort models. Basically, the sort indicator becomes a tri-state:
sort ascending, sort descending, unsort (sort by column -1).

[ChangeLog][QtWidgets][QHeaderView] Added the sortIndicatorClearable
property. Setting this property allows the user to clear the sort
indicator on a section, resetting the model to its default ordering.

Change-Id: Ibf4e280b2086b75ccd64d619ea4d70816dc3529f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2020-11-30 18:16:21 +02:00
..
qabstractitemview Fix a mistake when using QLatin1String::arg 2020-11-07 06:25:36 +01:00
qcolumnview CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qdatawidgetmapper CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qfileiconprovider QFileInfo: mark constructors as explicit 2020-11-15 18:30:16 +01:00
qheaderview QHeaderView: allow un-sorting of models 2020-11-30 18:16:21 +02:00
qitemdelegate Deprecate QVariant::Type 2020-10-23 09:58:57 +02:00
qitemeditorfactory Deprecate QVariant::Type 2020-10-23 09:58:57 +02:00
qitemview CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qlistview Use QTRY_COMPARE in an attempt to make the test less flaky 2020-11-10 23:05:23 +01:00
qlistwidget CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qtableview Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00
qtablewidget Stop copying events in tests 2020-11-12 15:25:06 +01:00
qtreeview Fix a mistake when using QLatin1String::arg 2020-11-07 06:25:36 +01:00
qtreewidget Deprecate QVariant::Type 2020-10-23 09:58:57 +02:00
qtreewidgetitemiterator CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
CMakeLists.txt CMake: Regenerate subdir test projects 2020-07-09 09:38:39 +02:00
itemviews.pro Remove the deprecated QDirModel 2020-06-04 19:11:19 +02:00