summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qt5/QtWidget.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index 5c860333793f..5f2a001e53c1 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -721,8 +721,13 @@ bool QtWidget::handleEvent(QtFrame& rFrame, QWidget& rWidget, QEvent* pEvent)
// Otherwise Qt will continue handling ToolTip events from the "parent" window.
const QtFrame* pPopupFrame = GetQtInstance()->activePopup();
if (!rFrame.m_aTooltipText.isEmpty() && (!pPopupFrame || pPopupFrame == &rFrame))
- QToolTip::showText(QCursor::pos(), toQString(rFrame.m_aTooltipText), &rWidget,
- rFrame.m_aTooltipArea);
+ {
+ // tdf#162297 Use a dummy style to ensure the tooltip is wrapped
+ QString sTooltipText("<font font-weight=normal>");
+ sTooltipText += toQString(rFrame.m_aTooltipText);
+ sTooltipText += "</font>";
+ QToolTip::showText(QCursor::pos(), sTooltipText, &rWidget, rFrame.m_aTooltipArea);
+ }
else
{
QToolTip::hideText();