diff --git a/src/libs/utils/basetreeview.cpp b/src/libs/utils/basetreeview.cpp index 03139a41540..7b39e766893 100644 --- a/src/libs/utils/basetreeview.cpp +++ b/src/libs/utils/basetreeview.cpp @@ -427,6 +427,14 @@ void BaseTreeView::mousePressEvent(QMouseEvent *ev) // d->toggleColumnWidth(columnAt(ev->x())); } +void BaseTreeView::mouseMoveEvent(QMouseEvent *ev) +{ + ItemViewEvent ive(ev, this); + QTC_ASSERT(model(), return); + if (!model()->setData(ive.index(), QVariant::fromValue(ive), ItemViewEventRole)) + TreeView::mouseMoveEvent(ev); +} + void BaseTreeView::mouseReleaseEvent(QMouseEvent *ev) { ItemViewEvent ive(ev, this); diff --git a/src/libs/utils/basetreeview.h b/src/libs/utils/basetreeview.h index 36da6589133..fdf6f619379 100644 --- a/src/libs/utils/basetreeview.h +++ b/src/libs/utils/basetreeview.h @@ -60,6 +60,7 @@ public: void setModel(QAbstractItemModel *model) override; void mousePressEvent(QMouseEvent *ev) override; + void mouseMoveEvent(QMouseEvent *ev) override; void mouseReleaseEvent(QMouseEvent *ev) override; void contextMenuEvent(QContextMenuEvent *ev) override; void showEvent(QShowEvent *ev) override;