forked from qt-creator/qt-creator
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 <david.schulz@qt.io>
This commit is contained in:
@@ -309,9 +309,11 @@ void BaseTreeView::setModel(QAbstractItemModel *m)
|
|||||||
void BaseTreeView::mousePressEvent(QMouseEvent *ev)
|
void BaseTreeView::mousePressEvent(QMouseEvent *ev)
|
||||||
{
|
{
|
||||||
TreeView::mousePressEvent(ev);
|
TreeView::mousePressEvent(ev);
|
||||||
const QModelIndex mi = indexAt(ev->pos());
|
// Resizing columns by clicking on the empty space seems to be controversial.
|
||||||
if (!mi.isValid())
|
// Let's try without for a while.
|
||||||
d->toggleColumnWidth(columnAt(ev->x()));
|
// const QModelIndex mi = indexAt(ev->pos());
|
||||||
|
// if (!mi.isValid())
|
||||||
|
// d->toggleColumnWidth(columnAt(ev->x()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
void BaseTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
||||||
|
|||||||
Reference in New Issue
Block a user