diff options
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 059617eb83..0daa0cfcb6 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2949,9 +2949,15 @@ bool QApplication::notify(QObject *receiver, QEvent *e) // a widget has already grabbed the wheel for a sequence if (QApplicationPrivate::wheel_widget) { - Q_ASSERT(phase != Qt::NoScrollPhase); - w = QApplicationPrivate::wheel_widget; - relpos = w->mapFromGlobal(wheel->globalPosition().toPoint()); + // Qt explicitly synthesizes a spontaneous event for the receiver, done + // by QGraphicsProxyWidget - so trust it + if (wheel->source() == Qt::MouseEventSynthesizedByQt) { + QApplicationPrivate::wheel_widget = w; + } else { + Q_ASSERT(phase != Qt::NoScrollPhase); + w = QApplicationPrivate::wheel_widget; + relpos = w->mapFromGlobal(wheel->globalPosition().toPoint()); + } } /* Start or finish a scrolling sequence by grabbing/releasing the wheel via |