summaryrefslogtreecommitdiffstats
path: root/src/webengine/ui_delegates_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/ui_delegates_manager.cpp')
-rw-r--r--src/webengine/ui_delegates_manager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp
index c9c013d52..24861fd35 100644
--- a/src/webengine/ui_delegates_manager.cpp
+++ b/src/webengine/ui_delegates_manager.cpp
@@ -504,7 +504,12 @@ public:
if (pos.isNull() || !item->contains(pos))
return;
const QPoint oldPos = QCursor::pos();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
const QPoint globalPos = item->mapToGlobal(QPointF(pos)).toPoint();
+#else
+ const QPoint posInWindow = item->mapToItem(item->window()->contentItem(), QPointF(pos)).toPoint();
+ const QPoint globalPos = item->window()->mapToGlobal(posInWindow);
+#endif
if (oldPos == globalPos)
return;
m_oldCursorPos = oldPos;