summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwhatsthis.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-09-14 11:21:22 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-09-14 11:29:01 (GMT)
commitc5a8d26d2337c3ed01f66783b69c5090c515be38 (patch)
tree9275c0da1f8deadf9b24ba9ec5c1eca91c5318c6 /src/gui/kernel/qwhatsthis.cpp
parent53ea5e98eab90ee9e3ae23e3b67e8993e6c2b31c (diff)
downloadQt-c5a8d26d2337c3ed01f66783b69c5090c515be38.zip
Qt-c5a8d26d2337c3ed01f66783b69c5090c515be38.tar.gz
Qt-c5a8d26d2337c3ed01f66783b69c5090c515be38.tar.bz2
Fix whatsThis breakage when using custom style sheet font
When setting a large font using style sheets, the whats this popup size calculation would be incorrect resulting in half visible lables. By calling ensurePolished before showing the label, we ensure that this will be properly handled. We also added a new test case for whatsThis in tst_qtooltip Task-number: QTBUG-2416 Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/kernel/qwhatsthis.cpp')
-rw-r--r--src/gui/kernel/qwhatsthis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwhatsthis.cpp b/src/gui/kernel/qwhatsthis.cpp
index 5e5e56f..0da3a9b 100644
--- a/src/gui/kernel/qwhatsthis.cpp
+++ b/src/gui/kernel/qwhatsthis.cpp
@@ -194,9 +194,9 @@ QWhatsThat::QWhatsThat(const QString& txt, QWidget* parent, QWidget *showTextFor
#ifndef QT_NO_CURSOR
setCursor(Qt::ArrowCursor);
#endif
-
QRect r;
doc = 0;
+ ensurePolished(); // Ensures style sheet font before size calc
if (Qt::mightBeRichText(text)) {
doc = new QTextDocument();
doc->setUndoRedoEnabled(false);