summaryrefslogtreecommitdiffstats
path: root/src/input/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/frontend')
-rw-r--r--src/input/frontend/qmouseevent.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input/frontend/qmouseevent.h b/src/input/frontend/qmouseevent.h
index 809c71ec5..884cec1d6 100644
--- a/src/input/frontend/qmouseevent.h
+++ b/src/input/frontend/qmouseevent.h
@@ -85,8 +85,13 @@ public:
explicit QMouseEvent(const QT_PREPEND_NAMESPACE(QMouseEvent) &e);
~QMouseEvent();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
inline int x() const { return int(m_event->position().x()); }
inline int y() const { return int(m_event->position().y()); }
+#else
+ inline int x() const { return int(m_event->x()); }
+ inline int y() const { return int(m_event->y()); }
+#endif
inline bool wasHeld() const {
#if QT_CONFIG(gestures)
return static_cast<Qt::GestureType>(m_event->type()) == Qt::TapAndHoldGesture;