diff options
author | Thorbjørn Lund Martsum <tmartsum@gmail.com> | 2012-11-04 18:17:14 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-02 16:09:14 +0100 |
commit | 28a21d98ef8d880a6dd86ee19dd803424bb5eae1 (patch) | |
tree | 6dab15e4a76a3d4b8854b7c36ff90143cfa9c530 /tests/manual/widgets | |
parent | 0f014fcde824d191eef003cd52ea70485499d845 (diff) |
QAbstractItemView - allow deselect in single selection mode.
This patch allows single selection to be cleared with the normal
control modifier. This affects e.g QTreeView and QListView.
Task-number: QTBUG-8836
Change-Id: I7fd50b987acc3552b36657409568192763257536
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/manual/widgets')
-rw-r--r-- | tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp b/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp index 7a8c1d159d..b5aeb023f4 100644 --- a/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp +++ b/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp @@ -99,6 +99,9 @@ int main(int argc, char *argv[]) m.setRowCount(500); m.setColumnCount(250); tv.setModel(&m); + tv.setSelectionMode(QAbstractItemView::SingleSelection); + // Comment in the line below to test selection with keyboard (space) + // tv.setEditTriggers(QAbstractItemView::NoEditTriggers); SomeHandler handler(tv.horizontalHeader(), &tv); tv.horizontalHeader()->setDefaultSectionSize(30); tv.show(); |