diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index b2dc614..36abeb7 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -3055,6 +3055,7 @@ int QAbstractItemView::sizeHintForColumn(int column) const
         int hint = d->delegateForIndex(index)->sizeHint(option, index).width();
         width = qMax(width, hint);
     }
+    qDebug() << __FUNCTION__ << column << width;
     return width;
 }
 
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index f1bdfc8..4754f39 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -588,7 +588,9 @@ int QHeaderView::sectionSizeHint(int logicalIndex) const
     else
         size = sectionSizeFromContents(logicalIndex);
     int hint = d->orientation == Qt::Horizontal ? size.width() : size.height();
-    return qBound(minimumSectionSize(), hint, maximumSectionSize());
+    int r =  qBound(minimumSectionSize(), hint, maximumSectionSize());
+    qDebug() << __FUNCTION__ << logicalIndex << r;
+    return r;
 }
 
 /*!
@@ -862,6 +864,7 @@ void QHeaderView::swapSections(int first, int second)
 
 void QHeaderView::resizeSection(int logical, int size)
 {
+    qDebug() << __FUNCTION__ << logical <<size;
     Q_D(QHeaderView);
     if (logical < 0 || logical >= count() || size < 0 || size > maxSizeSection)
         return;
@@ -1743,6 +1746,7 @@ void QHeaderView::reset()
 */
 void QHeaderView::headerDataChanged(Qt::Orientation orientation, int logicalFirst, int logicalLast)
 {
+    qDebug() << __FUNCTION__ << orientation << logicalFirst <<logicalLast;
     Q_D(QHeaderView);
     if (d->orientation != orientation)
         return;
@@ -2088,6 +2092,7 @@ void QHeaderView::initializeSections()
 void QHeaderView::initializeSections(int start, int end)
 {
     Q_D(QHeaderView);
+    qDebug() << __FUNCTION__ << start << end;
 
     Q_ASSERT(start >= 0);
     Q_ASSERT(end >= 0);
@@ -3172,6 +3177,7 @@ int QHeaderViewPrivate::lastVisibleVisualIndex() const
 */
 void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool useGlobalMode)
 {
+    qDebug() << '>' << __FUNCTION__ << globalMode <<  useGlobalMode;
     Q_Q(QHeaderView);
     //stop the timer in case it is delayed
     delayedResize.stop();
@@ -3195,6 +3201,7 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
 
     // count up the number of stretched sections and how much space left for them
     int lengthToStretch = (orientation == Qt::Horizontal ? viewport->width() : viewport->height());
+    qDebug() << __FUNCTION__ << "lengthToStretch" << lengthToStretch;
     int numberOfStretchedSections = 0;
     QList<int> section_sizes;
     for (int i = 0; i < sectionCount(); ++i) {
@@ -3236,6 +3243,7 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
         stretchSectionLength = qMax(hintLengthForEveryStretchedSection, q->minimumSectionSize());
         pixelReminder = lengthToStretch % numberOfStretchedSections;
     }
+    qDebug() << __FUNCTION__ <<"stretchSectionLength" << stretchSectionLength;
 
     // ### The code below would be nicer if it was cleaned up a bit (since spans has been replaced with items)
     int spanStartSection = 0;
@@ -3245,6 +3253,8 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
 
     // resize each section along the total length
     for (int i = 0; i < sectionCount(); ++i) {
+        qDebug() << __FUNCTION__ << "loop" <<i
+                    << "lastSectionSize" << lastSectionSize;
         int oldSectionLength = headerSectionSize(i);
         int newSectionLength = -1;
         QHeaderView::ResizeMode newSectionResizeMode = headerSectionResizeMode(i);
@@ -3260,10 +3270,13 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
                               ? QHeaderView::Stretch
                               : newSectionResizeMode);
             if (resizeMode == QHeaderView::Stretch && stretchSectionLength != -1) {
-                if (i == lastVisibleSection)
+                if (i == lastVisibleSection) {
                     newSectionLength = qMax(stretchSectionLength, lastSectionSize);
-                else
+                    qDebug() << __FUNCTION__ << "newSectionLength" << newSectionLength << "(last vis)";
+                } else {
                     newSectionLength = stretchSectionLength;
+                    qDebug() << __FUNCTION__ << "newSectionLength" << newSectionLength << "(mid)";
+                }
                 if (pixelReminder > 0) {
                     newSectionLength += 1;
                     --pixelReminder;
@@ -3271,6 +3284,7 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
                 section_sizes.removeFirst();
             } else {
                 newSectionLength = section_sizes.front();
+                qDebug() << __FUNCTION__ << "newSectionLength" << newSectionLength << "(stretch)";
                 section_sizes.removeFirst();
             }
         }
@@ -3290,6 +3304,7 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
         previousSectionLength = newSectionLength;
         previousSectionResizeMode = newSectionResizeMode;
     }
+    qDebug() << __FUNCTION__ << "previousSectionLength" <<previousSectionLength;
 
     createSectionItems(spanStartSection, sectionCount() - 1,
                       (sectionCount() - spanStartSection) * previousSectionLength,
@@ -3297,11 +3312,16 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
     //Q_ASSERT(headerLength() == length);
     resizeRecursionBlock = false;
     viewport->update();
+    qDebug() << '<' << __FUNCTION__ ;
 }
 
 void QHeaderViewPrivate::createSectionItems(int start, int end, int size, QHeaderView::ResizeMode mode)
 {
+
     int sizePerSection = size / (end - start + 1);
+    if (start == 1)
+        qDebug("1");
+    qDebug() << __FUNCTION__ << start << ".." << end  << "size" << size <<"per sec" << sizePerSection;
     if (end >= sectionItems.count()) {
         sectionItems.resize(end + 1);
         sectionStartposRecalc = true;
@@ -3310,6 +3330,7 @@ void QHeaderViewPrivate::createSectionItems(int start, int end, int size, QHeade
     for (int i = start; i <= end; ++i) {
         length += (sizePerSection - sectiondata[i].size);
         sectionStartposRecalc |= (sectiondata[i].size != sizePerSection);
+        qDebug() << __FUNCTION__ << i << "setting" << sizePerSection;
         sectiondata[i].size = sizePerSection;
         sectiondata[i].resizeMode = mode;
     }
@@ -3478,6 +3499,7 @@ void QHeaderViewPrivate::setDefaultSectionSize(int size)
             if (newSize != section.size) {
                 length += newSize - section.size; //the whole length is changed
                 const int oldSectionSize = section.sectionSize();
+                qDebug() << __FUNCTION__ << i << "setting" << size;
                 section.size = size;
                 emit q->sectionResized(logicalIndex(i), oldSectionSize, size);
             }
@@ -3509,8 +3531,11 @@ void QHeaderViewPrivate::resizeSectionItem(int visualIndex, int oldSize, int new
 
 int QHeaderViewPrivate::headerSectionSize(int visual) const
 {
-    if (visual < sectionCount() && visual >= 0)
-        return sectionItems.at(visual).sectionSize();
+    if (visual < sectionCount() && visual >= 0) {
+        int s= sectionItems.at(visual).sectionSize();
+        qDebug() << __FUNCTION__ << visual << s ;
+        return s;
+    }
     return -1;
 }
 
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index cd57b58..25c28f3 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -2756,9 +2756,12 @@ void QTreeWidget::setHeaderLabels(const QStringList &labels)
     Q_D(QTreeWidget);
     if (columnCount() < labels.count())
         setColumnCount(labels.count());
+    qDebug() << __FUNCTION__ << labels;
     QTreeWidgetItem *item = d->treeModel()->headerItem;
-    for (int i = 0; i < labels.count(); ++i)
+    for (int i = 0; i < labels.count(); ++i) {
+        qDebug() << __FUNCTION__ << "loop" <<i;
         item->setText(i, labels.at(i));
+    }
 }
 
 /*!
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 65e435f..ad2fabc 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -4336,6 +4336,8 @@ void QWidgetPrivate::setPalette_helper(const QPalette &palette)
 void QWidget::setFont(const QFont &font)
 {
     Q_D(QWidget);
+    const QFont of = QWidget::font();
+    qDebug() << __FUNCTION__ << this << of << font;
 
 #ifndef QT_NO_STYLE_STYLESHEET
     const QStyleSheetStyle* style;
