diff --git a/Modules/Tooltip/Tooltip.qml b/Modules/Tooltip/Tooltip.qml index a3185364..7874746d 100644 --- a/Modules/Tooltip/Tooltip.qml +++ b/Modules/Tooltip/Tooltip.qml @@ -122,8 +122,11 @@ PopupWindow { hideImmediately(); } + // Convert \n to
for RichText format + const processedText = tipText.replace(/\n/g, '
'); + // Set properties - text = tipText; + text = processedText; targetItem = target; // Find the correct screen dimensions based on target's global position @@ -326,7 +329,9 @@ PopupWindow { // Update text function function updateText(newText) { if (visible && targetItem) { - text = newText; + // Convert \n to
for RichText format + const processedText = newText.replace(/\n/g, '
'); + text = processedText; // Recalculate dimensions const tipWidth = Math.min(tooltipText.implicitWidth + (padding * 2), maxWidth);