diff --git a/Modules/Tooltip/Tooltip.qml b/Modules/Tooltip/Tooltip.qml index de1e3cc5c..3e449998f 100644 --- a/Modules/Tooltip/Tooltip.qml +++ b/Modules/Tooltip/Tooltip.qml @@ -167,7 +167,14 @@ PopupWindow { root.implicitHeight = tipHeight // Get target's global position - const targetGlobal = targetItem.mapToGlobal(0, 0) + var targetGlobal + const targetWindow = targetItem.Window.window + if (targetWindow) { + targetGlobal = targetItem.mapToItem(targetWindow.contentItem, 0, 0) + } else { + targetGlobal = targetItem.mapToItem(null, 0, 0) + } + const targetWidth = targetItem.width const targetHeight = targetItem.height