{
QWidget *widget = static_cast<QWidget*>(obj);
QString tooltip = widget->toolTip();
- if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt/>") && !Qt::mightBeRichText(tooltip))
+ if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !Qt::mightBeRichText(tooltip))
{
// Prefix <qt/> to make sure Qt detects this as rich text
// Escape the current message as HTML and replace \n by <br>
- tooltip = "<qt/>" + HtmlEscape(tooltip, true);
+ tooltip = "<qt>" + HtmlEscape(tooltip, true) + "<qt/>";
widget->setToolTip(tooltip);
return true;
}