diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 82d04d3a56..0eda9250f9 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1025,15 +1025,15 @@ Qt::MouseEventFlags QMouseEvent::flags() const The \a type parameter must be QEvent::HoverEnter, QEvent::HoverLeave, or QEvent::HoverMove. - The \a pos is the current mouse cursor's position relative to the - receiving widget, \a oldPos is its previous such position, and + The \a scenePos is the current mouse cursor's position relative to the + receiving window or scene, \a oldPos is its previous such position, and \a globalPos is the mouse position in absolute coordinates. \a modifiers hold the state of all keyboard modifiers at the time of the event. */ -QHoverEvent::QHoverEvent(Type type, const QPointF &pos, const QPointF &globalPos, const QPointF &oldPos, +QHoverEvent::QHoverEvent(Type type, const QPointF &scenePos, const QPointF &globalPos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers, const QPointingDevice *device) - : QSinglePointEvent(type, device, pos, pos, globalPos, Qt::NoButton, Qt::NoButton, modifiers), m_oldPos(oldPos) + : QSinglePointEvent(type, device, scenePos, scenePos, globalPos, Qt::NoButton, Qt::NoButton, modifiers), m_oldPos(oldPos) { } diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index ab8a341d26..1d2a99c97f 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -242,7 +242,7 @@ class Q_GUI_EXPORT QHoverEvent : public QSinglePointEvent { Q_DECL_EVENT_COMMON(QHoverEvent) public: - QHoverEvent(Type type, const QPointF &pos, const QPointF &globalPos, const QPointF &oldPos, + QHoverEvent(Type type, const QPointF &scenePos, const QPointF &globalPos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers = Qt::NoModifier, const QPointingDevice *device = QPointingDevice::primaryPointingDevice()); #if QT_DEPRECATED_SINCE(6, 3)