From f9f777c40a7d8e5f24bbdf8ee509594a0e38c56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Martsum?= Date: Wed, 2 Dec 2015 16:07:55 +0100 Subject: QAbstractItemView - Fix docs to match behavior (SelectionMode) We can deselect the item in single selection mode. It was introduced in 28a21d98ef8d880a6dd86ee19dd803424bb5eae1 The motivation was QTBUG-8836 - and furthermore it was in many situations already possible to deselect the item by clicking in the viewport. A restore of selection by reacting on the signal QItemSelectionModel::selectionChanged is easily possible If the behavior was changed to follow the documentation, such a similar simply work-around to allow deselect would not be possible. Task-number: QTBUG-49217 Change-Id: I5466337dc547414d3e0c045ab35d618dba56c508 Reviewed-by: David Faure --- src/widgets/itemviews/qabstractitemview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 9bb4497811..0ab2e1860c 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -340,8 +340,8 @@ void QAbstractItemViewPrivate::_q_scrollerStateChanged() This enum indicates how the view responds to user selections: \value SingleSelection When the user selects an item, any already-selected - item becomes unselected, and the user cannot unselect the selected item by - clicking on it. + item becomes unselected. It is possible for the user to deselect the selected + item. \value ContiguousSelection When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user -- cgit v1.2.3