path: root/src/widgets
diff options
authorThorbjørn Lindeijer <>2016-09-06 11:38:18 +0200
committerThorbjørn Lindeijer <>2016-09-12 08:03:30 +0000
commit66fcd0cf6674fa96ede7776ca3afa786499a07ad (patch)
tree4d916b4a23b870831eb3ec2ed4b5d96cf922e8af /src/widgets
parenta32217cb551612277d43b3f7c08da85abe3874ac (diff)
Fixed glitch when dragging a movable QTabBar tab
When you would start to drag a tab, and then drag it in the other direction along the point where you started the drag, the tab would fail to follow the mouse for a distance twice the "startDragDistance", before jumping to the mouse again. Fixed this by only taking into account the "startDragDistance" when checking whether a drag is started, and to rely on the "dragInProgress" variable otherwise. Change-Id: I5dd4ebd8340fef7e870f087be68c5097b49728cb Reviewed-by: Marc Mutz <>
Diffstat (limited to 'src/widgets')
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index ed820888b4..2a163c18b5 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -1869,9 +1869,8 @@ void QTabBar::mouseMoveEvent(QMouseEvent *event)
- int offset = (event->pos() - d->dragStartPosition).manhattanLength();
if (event->buttons() == Qt::LeftButton
- && offset > QApplication::startDragDistance()
+ && d->dragInProgress
&& d->validIndex(d->pressedIndex)) {
bool vertical = verticalTabs(d->shape);
int dragDistance;