diff --git a/src/frontend/qt_sdl/Screen.cpp b/src/frontend/qt_sdl/Screen.cpp index 29e0663a..c302d546 100644 --- a/src/frontend/qt_sdl/Screen.cpp +++ b/src/frontend/qt_sdl/Screen.cpp @@ -276,8 +276,13 @@ void ScreenPanel::tabletEvent(QTabletEvent* event) case QEvent::TabletPress: case QEvent::TabletMove: { +#if QT_VERSION_MAJOR == 6 + int x = event->position().x(); + int y = event->position().y(); +#else int x = event->x(); int y = event->y(); +#endif if (layout.GetTouchCoords(x, y, event->type()==QEvent::TabletMove)) { @@ -302,8 +307,10 @@ void ScreenPanel::tabletEvent(QTabletEvent* event) void ScreenPanel::touchEvent(QTouchEvent* event) { +#if QT_VERSION_MAJOR == 6 if (event->device()->type() == QInputDevice::DeviceType::TouchPad) return; +#endif event->accept(); @@ -311,9 +318,15 @@ void ScreenPanel::touchEvent(QTouchEvent* event) { case QEvent::TouchBegin: case QEvent::TouchUpdate: +#if QT_VERSION_MAJOR == 6 if (event->points().length() > 0) { QPointF lastPosition = event->points().first().lastPosition(); +#else + if (event->touchPoints().length() > 0) + { + QPointF lastPosition = event->touchPoints().first().lastPos(); +#endif int x = (int)lastPosition.x(); int y = (int)lastPosition.y();