diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index d95932f4db..b82d82a9fa 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -68,6 +68,7 @@
 #include "private/qpagedpaintdevice_p.h"
 
 #include <limits.h>
+#include <qdebug.h>
 
 QT_BEGIN_NAMESPACE
 
@@ -680,6 +681,7 @@ void QTextDocument::setTextWidth(qreal width)
 qreal QTextDocument::textWidth() const
 {
     Q_D(const QTextDocument);
+    qDebug() << __FUNCTION__ << "rets" <<  d->pageSize;
     return d->pageSize.width();
 }
 
@@ -777,7 +779,9 @@ void QTextDocument::adjustSize()
 {
     // Pull this private function in from qglobal.cpp
     QFont f = defaultFont();
+
     QFontMetrics fm(f);
+    qDebug() << __FUNCTION__<< f.family() << f.pointSize() << f.pixelSize();
     int mw =  fm.horizontalAdvance(QLatin1Char('x')) * 80;
     int w = mw;
     setTextWidth(w);
@@ -792,6 +796,7 @@ void QTextDocument::adjustSize()
             setTextWidth(qMin(w, mw));
         }
     }
+    qDebug() << __FUNCTION__<< "w=" << w << "idealWidth()=" << idealWidth();
     setTextWidth(idealWidth());
 }
 
@@ -1774,6 +1779,7 @@ QTextBlock QTextDocument::lastBlock() const
 void QTextDocument::setPageSize(const QSizeF &size)
 {
     Q_D(QTextDocument);
+     qDebug() << __FUNCTION__  << size;
     d->pageSize = size;
     if (d->lout)
         d->lout->documentChanged(0, 0, d->length());
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index 69b62ff7d7..fc55c23125 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -46,6 +46,7 @@
 #include <qdesktopwidget.h>
 #include <private/qdesktopwidget_p.h>
 #include <qevent.h>
+#include <qdebug.h>
 #include <qpointer.h>
 #include <qstyle.h>
 #include <qstyleoption.h>
@@ -204,6 +205,8 @@ void QTipLabel::restartExpireTimer(int msecDisplayTime)
 
 void QTipLabel::reuseTip(const QString &text, int msecDisplayTime)
 {
+    qDebug() << __FUNCTION__ << text << msecDisplayTime
+             << sizeHint() << "styleSheetParent=" << styleSheetParent;
 #ifndef QT_NO_STYLE_STYLESHEET
     if (styleSheetParent){
         disconnect(styleSheetParent, SIGNAL(destroyed()),
@@ -214,7 +217,10 @@ void QTipLabel::reuseTip(const QString &text, int msecDisplayTime)
 
     setWordWrap(Qt::mightBeRichText(text));
     setText(text);
-    QFontMetrics fm(font());
+    QFont f = font();
+    QFontMetrics fm(f);
+    qDebug() << __FUNCTION__ << f.family() << f.pointSize() << "pt" << f.pixelSize() << "px";
+
     QSize extra(1, 0);
     // Make it look good with the default ToolTip font on Mac, which has a small descent.
     if (fm.descent() == 2 && fm.ascent() >= 11)
@@ -241,6 +247,7 @@ void QTipLabel::resizeEvent(QResizeEvent *e)
     option.init(this);
     if (style()->styleHint(QStyle::SH_ToolTip_Mask, &option, this, &frameMask))
         setMask(frameMask.region);
+    qDebug() << __FUNCTION__ << e;
 
     QLabel::resizeEvent(e);
 }
@@ -276,6 +283,7 @@ void QTipLabel::hideTipImmediately()
 
 void QTipLabel::setTipRect(QWidget *w, const QRect &r)
 {
+    qDebug() << __FUNCTION__ << w << r;
     if (Q_UNLIKELY(!r.isNull() && !w)) {
         qWarning("QToolTip::setTipRect: Cannot pass null widget if rect is set");
         return;
@@ -477,6 +485,7 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
 
 void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
 {
+    qDebug() << __FUNCTION__ << pos << text << w << rect;
     if (QTipLabel::instance && QTipLabel::instance->isVisible()){ // a tip does already exist
         if (text.isEmpty()){ // empty text means hide current tip
             QTipLabel::instance->hideTip();
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 74f2dc0c41..6d3274f2f2 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -4692,6 +4692,7 @@ void QWidget::setFont(const QFont &font)
         style->saveWidgetFont(this, font);
     }
 #endif
+    qDebug() << __FUNCTION__ << font;
 
     setAttribute(Qt::WA_SetFont, font.resolve() != 0);
 
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index ee4825d3e5..5678b9fe62 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -555,6 +555,7 @@ void QLabel::setMargin(int margin)
 QSize QLabelPrivate::sizeForWidth(int w) const
 {
     Q_Q(const QLabel);
+    qDebug() << __FUNCTION__ << q << w << q->font();
     if(q->minimumWidth() > 0)
         w = qMax(w, q->minimumWidth());
     QSize contentsMargin(leftmargin + rightmargin, topmargin + bottommargin);
@@ -591,6 +592,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const
                 vextra += m;
         }
 
+        qDebug() << __FUNCTION__ << "control=" << control;
         if (control) {
             ensureTextLayouted();
             const qreal oldTextWidth = control->textWidth();
@@ -630,6 +632,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const
                 w = 2000;
             w -= (hextra + contentsMargin.width());
             br = fm.boundingRect(0, 0, w ,2000, flags, text);
+            qDebug() << __FUNCTION__ << "QFM::boundingRect=" << br;
             if (tryWidth && br.height() < 4*fm.lineSpacing() && br.width() > w/2)
                 br = fm.boundingRect(0, 0, w/2, 2000, flags, text);
             if (tryWidth && br.height() < 2*fm.lineSpacing() && br.width() > w/4)
@@ -640,7 +643,9 @@ QSize QLabelPrivate::sizeForWidth(int w) const
     }
 
     const QSize contentsSize(br.width() + hextra, br.height() + vextra);
-    return (contentsSize + contentsMargin).expandedTo(q->minimumSize());
+    QSize r = (contentsSize + contentsMargin).expandedTo(q->minimumSize());
+    qDebug() << __FUNCTION__ << "rets" << r;
+    return r;
 }
 
 
@@ -823,6 +828,7 @@ QSize QLabel::sizeHint() const
     Q_D(const QLabel);
     if (!d->valid_hints)
         (void) QLabel::minimumSizeHint();
+    qDebug() << __FUNCTION__ << this << d->sh;
     return d->sh;
 }
 
@@ -831,6 +837,7 @@ QSize QLabel::sizeHint() const
 */
 QSize QLabel::minimumSizeHint() const
 {
+    qDebug() << __FUNCTION__ << this;
     Q_D(const QLabel);
     if (d->valid_hints) {
         if (d->sizePolicy == sizePolicy())
@@ -1056,6 +1063,7 @@ void QLabel::paintEvent(QPaintEvent *)
                 if (!style->styleHint(QStyle::SH_UnderlineShortcut, &opt, this))
                     flags |= Qt::TextHideMnemonic;
             }
+            qDebug() << __FUNCTION__ << painter.font() << "lr=" << lr;
             style->drawItemText(&painter, lr.toRect(), flags, opt.palette, isEnabled(), d->text, foregroundRole());
         }
     } else
@@ -1451,11 +1459,13 @@ QRect QLabelPrivate::documentRect() const
         if (align & Qt::AlignBottom)
             cr.setBottom(cr.bottom() - m);
     }
+    qDebug() << __FUNCTION__ <<     q << cr;
     return cr;
 }
 
 void QLabelPrivate::ensureTextPopulated() const
 {
+    qDebug() << __FUNCTION__ ;
     if (!textDirty)
         return;
     if (control) {
@@ -1495,6 +1505,7 @@ void QLabelPrivate::ensureTextPopulated() const
 
 void QLabelPrivate::ensureTextLayouted() const
 {
+    qDebug() << __FUNCTION__ ;
     if (!textLayoutDirty)
         return;
     ensureTextPopulated();
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index d3203e180b..683aacb0f7 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -2478,6 +2478,7 @@ QList<QTextEdit::ExtraSelection> QWidgetTextControl::extraSelections() const
 
 void QWidgetTextControl::setTextWidth(qreal width)
 {
+    qDebug() << __FUNCTION__ << width;
     Q_D(QWidgetTextControl);
     d->doc->setTextWidth(width);
 }
@@ -2485,12 +2486,14 @@ void QWidgetTextControl::setTextWidth(qreal width)
 qreal QWidgetTextControl::textWidth() const
 {
     Q_D(const QWidgetTextControl);
+    qDebug() << __FUNCTION__ << "rets" << d->doc->textWidth();
     return d->doc->textWidth();
 }
 
 QSizeF QWidgetTextControl::size() const
 {
     Q_D(const QWidgetTextControl);
+    qDebug() << __FUNCTION__ << "rets" << d->doc->size();
     return d->doc->size();
 }
 
@@ -3059,7 +3062,9 @@ QPointF QWidgetTextControl::anchorPosition(const QString &name) const
 
 void QWidgetTextControl::adjustSize()
 {
+
     Q_D(QWidgetTextControl);
+    qDebug() << __FUNCTION__;
     d->doc->adjustSize();
 }
 
