diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-05 09:12:59 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-05 09:15:12 (GMT) |
commit | 80e47c92e0b4f506b2b57d0e58022903dc62ba3d (patch) | |
tree | 27e205c620d64e09f3866279c1af3d36b0697810 /src/gui/kernel/qtooltip.cpp | |
parent | 10dba674d366260589f3b742e5b1b87ce9ddd47c (diff) | |
download | Qt-80e47c92e0b4f506b2b57d0e58022903dc62ba3d.zip Qt-80e47c92e0b4f506b2b57d0e58022903dc62ba3d.tar.gz Qt-80e47c92e0b4f506b2b57d0e58022903dc62ba3d.tar.bz2 |
Tooltip: reusing tooltips sometimes goes wrong
We reuse tooltip whenever we can. But we forget to check if
the format of the text changes inbetween (from html to plain).
This causes the word wrap to fail sometimes. This change will
fix that.
Rev-By:MortenS
Diffstat (limited to 'src/gui/kernel/qtooltip.cpp')
-rw-r--r-- | src/gui/kernel/qtooltip.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qtooltip.cpp b/src/gui/kernel/qtooltip.cpp index 2d0d209..4261808 100644 --- a/src/gui/kernel/qtooltip.cpp +++ b/src/gui/kernel/qtooltip.cpp @@ -183,7 +183,6 @@ QTipLabel::QTipLabel(const QString &text, QWidget *w) setFrameStyle(QFrame::NoFrame); setAlignment(Qt::AlignLeft); setIndent(1); - setWordWrap(Qt::mightBeRichText(text)); qApp->installEventFilter(this); setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / 255.0); setMouseTracking(true); @@ -208,6 +207,7 @@ void QTipLabel::reuseTip(const QString &text) } #endif + setWordWrap(Qt::mightBeRichText(text)); setText(text); QFontMetrics fm(font()); QSize extra(1, 0); |