diff --git a/widgets/icon.cpp b/widgets/icon.cpp index 7c4cb7f49..24eaf3946 100644 --- a/widgets/icon.cpp +++ b/widgets/icon.cpp @@ -963,6 +963,7 @@ void Icon::mousePressEvent(QGraphicsSceneMouseEvent *event) } d->states |= Private::PressedState; + d->clickStartPos = scenePos(); bool handled = false; foreach (IconAction *action, d->cornerActions) { @@ -1016,6 +1017,8 @@ void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } } + handled = d->clickStartPos != scenePos(); + if (!handled) { if (boundingRect().contains(event->pos())) { emit clicked(); diff --git a/widgets/icon_p.h b/widgets/icon_p.h index db9354558..c24a6a8b4 100644 --- a/widgets/icon_p.h +++ b/widgets/icon_p.h @@ -174,6 +174,7 @@ public: bool invertLayout; bool drawBg; QSizeF currentSize; + QPointF clickStartPos; QList cornerActions;