From ba17b58ede6bd8d8cd0e6c201d6903fcd1ac9b51 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 5 Feb 2018 10:29:03 +0100 Subject: [PATCH] BaseTreeView: Disable resizing columns by clicking on the background Resizing columns by clicking on the empty space seems to be controversial, perhaps because it also has the side-effect of resetting the column resize behavior to "automatic" Let's try without for a while. Task-number: QTCREATORBUG-19169 Change-Id: I0b480d6857dba9f247fa3537273073e3c65712d2 Reviewed-by: David Schulz --- src/libs/utils/basetreeview.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libs/utils/basetreeview.cpp b/src/libs/utils/basetreeview.cpp index ec3dc2f24cf..f477ba04533 100644 --- a/src/libs/utils/basetreeview.cpp +++ b/src/libs/utils/basetreeview.cpp @@ -309,9 +309,11 @@ void BaseTreeView::setModel(QAbstractItemModel *m) void BaseTreeView::mousePressEvent(QMouseEvent *ev) { TreeView::mousePressEvent(ev); - const QModelIndex mi = indexAt(ev->pos()); - if (!mi.isValid()) - d->toggleColumnWidth(columnAt(ev->x())); +// Resizing columns by clicking on the empty space seems to be controversial. +// Let's try without for a while. +// const QModelIndex mi = indexAt(ev->pos()); +// if (!mi.isValid()) +// d->toggleColumnWidth(columnAt(ev->x())); } void BaseTreeView::contextMenuEvent(QContextMenuEvent *ev)