diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index e1e45143b4..ec316db62c 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -1664,6 +1664,7 @@ bool QAbstractItemView::event(QEvent *event)
         updateGeometries();
         break;
     case QEvent::StyleChange:
+        qDebug() << __FUNCTION__ << this << "Calling doItemsLayout on  StyleChange";
         doItemsLayout();
         if (!d->verticalScrollModeSet)
             resetVerticalScrollMode();
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp
index dff4cc4593..303b5ade57 100644
--- a/src/widgets/itemviews/qitemdelegate.cpp
+++ b/src/widgets/itemviews/qitemdelegate.cpp
@@ -135,9 +135,12 @@ QRect QItemDelegatePrivate::displayRect(const QModelIndex &index, const QStyleOp
     const QString text = valueToText(value, option);
     const QVariant fontVal = index.data(Qt::FontRole);
     const QFont fnt = qvariant_cast<QFont>(fontVal).resolve(option.font);
-    return q->textRectangle(nullptr,
+    auto r= q->textRectangle(nullptr,
                             textLayoutBounds(option, decorationRect, checkRect),
                             fnt, text);
+    qDebug() << "QItemDelegatePrivate::displayRect" << option.widget << text
+             << fnt << r;
+    return r;
 }
 
 // similar to QCommonStylePrivate::viewItemSize(Qt::DisplayRole)
@@ -475,6 +478,7 @@ void QItemDelegate::paint(QPainter *painter,
 QSize QItemDelegate::sizeHint(const QStyleOptionViewItem &option,
                               const QModelIndex &index) const
 {
+    qDebug() << __FUNCTION__ << this<< index;
     Q_D(const QItemDelegate);
     QVariant value = index.data(Qt::SizeHintRole);
     if (value.isValid())
@@ -485,7 +489,9 @@ QSize QItemDelegate::sizeHint(const QStyleOptionViewItem &option,
 
     doLayout(option, &checkRect, &decorationRect, &displayRect, true);
 
-    return (decorationRect|displayRect|checkRect).size();
+    auto r = (decorationRect|displayRect|checkRect).size();
+    qDebug() << __FUNCTION__ << this<< index << "rets" << r;
+    return r;
 }
 
 /*!
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index e07514f297..d18f0637db 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -958,6 +958,7 @@ QStyleOptionViewItem QListView::viewOptions() const
 void QListView::paintEvent(QPaintEvent *e)
 {
     Q_D(QListView);
+    qDebug() << " QListView::paintEvent" << this;
     if (!d->itemDelegate)
         return;
     QStyleOptionViewItem option = d->viewOptionsV1();
@@ -986,6 +987,7 @@ void QListView::paintEvent(QPaintEvent *e)
     for (QVector<QModelIndex>::const_iterator it = toBeRendered.constBegin(); it != end; ++it) {
         Q_ASSERT((*it).isValid());
         option.rect = visualRect(*it);
+        qDebug() << __FUNCTION__ << this << it->row() << "loop vr="  << option.rect;
 
         if (flow() == TopToBottom)
             option.rect.setWidth(qMin(maxSize, option.rect.width()));
@@ -1833,15 +1835,22 @@ QModelIndex QListViewPrivate::closestIndex(const QRect &target,
 
 QSize QListViewPrivate::itemSize(const QStyleOptionViewItem &option, const QModelIndex &index) const
 {
+    qDebug() << q_func() << "QListViewPrivate::itemSize" << index.row()
+             << "uniformItemSizes=" << uniformItemSizes;
     if (!uniformItemSizes) {
         const QAbstractItemDelegate *delegate = delegateForIndex(index);
-        return delegate ? delegate->sizeHint(option, index) : QSize();
+        auto r = delegate ? delegate->sizeHint(option, index) : QSize();
+        qDebug() << q_func() << "QListViewPrivate::itemSize" << index.row()
+                 << "nonUniformItemSizes=" << r;
+        return r;
     }
     if (!cachedItemSize.isValid()) { // the last item is probaly the largest, so we use its size
         int row = model->rowCount(root) - 1;
         QModelIndex sample = model->index(row, column, root);
         const QAbstractItemDelegate *delegate = delegateForIndex(sample);
         cachedItemSize = delegate ? delegate->sizeHint(option, sample) : QSize();
+        qDebug() << q_func() << "QListViewPrivate::itemSize" << index.row()
+                 << "cachedItemSize=" << cachedItemSize;
     }
     return cachedItemSize;
 }
@@ -2438,12 +2447,13 @@ QListViewItem QListModeViewBase::indexToListViewItem(const QModelIndex &index) c
     } else {
         size.setWidth(cellSize.width());
     }
-
+    qDebug() << qq << "QListModeViewBase::indexToListViewItem" << index.data().toString() << pos << size;
     return QListViewItem(QRect(pos, size), index.row());
 }
 
 QPoint QListModeViewBase::initStaticLayout(const QListViewLayoutInfo &info)
 {
+    qDebug() << __FUNCTION__ << qq << "QListViewLayoutInfo" << info.bounds<< info.grid;
     int x, y;
     if (info.first == 0) {
         flowPositions.clear();
@@ -2472,6 +2482,7 @@ QPoint QListModeViewBase::initStaticLayout(const QListViewLayoutInfo &info)
             y = batchSavedPosition;
         }
     }
+    qDebug() << __FUNCTION__ << qq << QPoint(x, y);
     return QPoint(x, y);
 }
 
@@ -2482,6 +2493,8 @@ void QListModeViewBase::doStaticLayout(const QListViewLayoutInfo &info)
 {
     const bool useItemSize = !info.grid.isValid();
     const QPoint topLeft = initStaticLayout(info);
+    qDebug() << __FUNCTION__ << qq << "topLeft=" << topLeft << "useItemSize=" << useItemSize
+             << "info.bounds=" << info.bounds << "info.spacing=" << info.spacing;
     QStyleOptionViewItem option = viewOptions();
     option.rect = info.bounds;
     option.rect.adjust(info.spacing, info.spacing, -info.spacing, -info.spacing);
@@ -2516,21 +2529,29 @@ void QListModeViewBase::doStaticLayout(const QListViewLayoutInfo &info)
         deltaFlowPosition = info.grid.height(); // dy
         deltaSegPosition = useItemSize ? batchSavedDeltaSeg : info.grid.width(); // dx
         deltaSegHint = info.grid.width();
+        qDebug() << __FUNCTION__ << qq << "segStartPosition=" << segStartPosition
+                 << "segEndPosition=" << segEndPosition << "flowPosition=" << flowPosition
+                 << "deltaFlowPosition=" << deltaFlowPosition << "deltaSegPosition="
+                 << deltaSegPosition << "deltaSegHint=" << deltaSegHint;
     }
 
     for (int row = info.first; row <= info.last; ++row) {
+        qDebug() << __FUNCTION__ << qq << "row=" << row << "hid=" << isHidden(row);
         if (isHidden(row)) { // ###
             flowPositions.append(flowPosition);
         } else {
             // if we are not using a grid, we need to find the deltas
             if (useItemSize) {
                 QSize hint = itemSize(option, modelIndex(row));
+                qDebug() << __FUNCTION__ << qq << "row=" << row << "hint=" << hint;
                 if (info.flow == QListView::LeftToRight) {
                     deltaFlowPosition = hint.width() + info.spacing;
                     deltaSegHint = hint.height() + info.spacing;
                 } else { // TopToBottom
                     deltaFlowPosition = hint.height() + info.spacing;
                     deltaSegHint = hint.width() + info.spacing;
+                    qDebug() << __FUNCTION__ << qq << "deltaFlowPosition=" << deltaFlowPosition
+                             << "deltaSegHint=" << deltaSegHint;
                 }
             }
             // create new segment
@@ -2538,6 +2559,7 @@ void QListModeViewBase::doStaticLayout(const QListViewLayoutInfo &info)
                 segmentExtents.append(flowPosition);
                 flowPosition = info.spacing + segStartPosition;
                 segPosition += info.spacing + deltaSegPosition;
+                qDebug() << __FUNCTION__ << qq << "segPosition=" << segPosition;
                 segmentPositions.append(segPosition);
                 segmentStartRows.append(row);
                 deltaSegPosition = 0;
@@ -2551,6 +2573,7 @@ void QListModeViewBase::doStaticLayout(const QListViewLayoutInfo &info)
         }
     }
     // used when laying out next batch
+    qDebug() << __FUNCTION__ << qq << "batchSavedPosition = flowPosition" << flowPosition;
     batchSavedPosition = flowPosition;
     batchSavedDeltaSeg = deltaSegPosition;
     batchStartRow = info.last + 1;
@@ -2570,6 +2593,7 @@ void QListModeViewBase::doStaticLayout(const QListViewLayoutInfo &info)
     if (info.last == info.max) {
         segmentExtents.append(flowPosition);
         scrollValueMap.append(flowPositions.count());
+        qDebug() << __FUNCTION__ << qq<< "flowPosition=" << flowPosition;
         flowPositions.append(flowPosition);
         segmentPositions.append(info.wrap ? segPosition + deltaSegPosition : INT_MAX);
     }
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 53d87c6113..b45f3a54f0 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -2771,6 +2771,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate)
 {
     Q_Q(QWidget);
     QStyle *oldStyle = q->style();
+    qDebug() << __FUNCTION__ << q << newStyle << "propagate=" << propagate;
 
     createExtra();
 
@@ -2822,10 +2823,12 @@ void QWidgetPrivate::inheritStyle()
     QStyle *extraStyle = extra ? (QStyle*)extra->style : nullptr;
 
     QStyleSheetStyle *proxy = qt_styleSheet(extraStyle);
+    qDebug() << __FUNCTION__ << q << "proxy=" << proxy;
 
     if (!q->styleSheet().isEmpty()) {
         Q_ASSERT(proxy);
         proxy->repolish(q);
+        qDebug() << __FUNCTION__ << q << "proxy->repolish(q) ->return";
         return;
     }
 
@@ -8759,6 +8762,7 @@ QSize QWidgetPrivate::adjustedSize() const
 
 void QWidget::adjustSize()
 {
+    qDebug() << __FUNCTION__ << this;
     Q_D(QWidget);
     ensurePolished();
     QSize s = d->adjustedSize();
@@ -10524,6 +10528,7 @@ void QWidget::updateGeometry()
 {
     Q_D(QWidget);
     d->updateGeometry_helper(false);
+    // qDebug() << this << "QWidget::updateGeometry" << geometry();
 }
 
 /*! \property QWidget::windowFlags
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index c565932889..bcdf2f8f9d 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -3212,6 +3212,7 @@ QSize QFusionStyle::sizeFromContents(ContentsType type, const QStyleOption *opti
         newSize += QSize(8, 5);
         break;
     case CT_MenuItem:
+        qDebug() << "QFusionStyle::sizeFromContents()" << widget  << newSize;
         if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
             int w = newSize.width();
             int maxpmw = menuItem->maxIconWidth;
@@ -3232,8 +3233,9 @@ QSize QFusionStyle::sizeFromContents(ContentsType type, const QStyleOption *opti
             w += QStyleHelper::dpiScaled(int(QFusionStylePrivate::menuRightBorder) + 10);
             newSize.setWidth(w);
             if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
-                if (!menuItem->text.isEmpty()) {
+                if (!menuItem->text.isEmpty()) {                    
                     newSize.setHeight(menuItem->fontMetrics.height());
+                    qDebug() << "QFusionStyle::sizeFromContents()" << newSize.height();
                 }
             }
             else if (!menuItem->icon.isNull()) {
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 4518d8c736..a3276fe538 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -5088,6 +5088,8 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
             PseudoElement pe = (mi->menuItemType == QStyleOptionMenuItem::Separator)
                                     ? PseudoElement_MenuSeparator : PseudoElement_Item;
             QRenderRule subRule = renderRule(w, opt, pe);
+            qDebug() << "QStyleSheetStyle::sizeFromContents subRule.hasFont" << subRule.hasFont
+                     << csz;
             if ((pe == PseudoElement_MenuSeparator) && subRule.hasContentsSize()) {
                 return QSize(sz.width(), subRule.size().height());
             } else if ((pe == PseudoElement_Item) && (subRule.hasBox() || subRule.hasBorder())) {
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index bdd2462c92..29748a5c7c 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -87,6 +87,39 @@
 
 QT_BEGIN_NAMESPACE
 
+QComboBoxListView::QComboBoxListView(QComboBox *cmb) : combo(cmb)
+{
+    qDebug() << __FUNCTION__ << cmb;
+}
+
+void QComboBoxListView::paintEvent(QPaintEvent *e)
+{
+    if (objectName().isEmpty())
+        setObjectName(combo->objectName() + QLatin1String("LV"));
+    qDebug() << __FUNCTION__ << e << combo << "par=" << parentWidget()
+             << logicalDpiX() << "dpi";
+    if (combo) {
+        QStyleOptionComboBox opt;
+        opt.initFrom(combo);
+        opt.editable = combo->isEditable();
+        if (combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo)) {
+            //we paint the empty menu area to avoid having blank space that can happen when scrolling
+            QStyleOptionMenuItem menuOpt;
+            menuOpt.initFrom(this);
+            menuOpt.palette = palette();
+            menuOpt.state = QStyle::State_None;
+            menuOpt.checkType = QStyleOptionMenuItem::NotCheckable;
+            menuOpt.menuRect = e->rect();
+            qDebug() << __FUNCTION__ << combo << " SH_ComboBox_Popup rect=" << menuOpt.menuRect;
+            menuOpt.maxIconWidth = 0;
+            menuOpt.tabWidth = 0;
+            QPainter p(viewport());
+            combo->style()->drawControl(QStyle::CE_MenuEmptyArea, &menuOpt, &p, this);
+        }
+    }
+    QListView::paintEvent(e);
+}
+
 QComboBoxPrivate::QComboBoxPrivate()
     : QWidgetPrivate(),
       model(0),
@@ -123,10 +156,22 @@ QComboBoxPrivate::~QComboBoxPrivate()
 #endif
 }
 
+QSize QComboMenuDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
+    QStyleOptionMenuItem opt = getStyleOption(option, index);
+    auto st = mCombo->style();
+    auto r = st->sizeFromContents(
+                QStyle::CT_MenuItem, &opt, option.rect.size(), mCombo);
+    qDebug() << "QComboMenuDelegate::sizeHint"  << mCombo << st << "rets" << r;
+    return r;
+}
+
 QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewItem &option,
                                                         const QModelIndex &index) const
 {
     QStyleOptionMenuItem menuOption;
+    qDebug() << "QComboMenuDelegate::getStyleOption"  << mCombo
+             << "mCombo->font=" << mCombo->font()
+             << "WA_SetFont=" << mCombo->testAttribute(Qt::WA_SetFont);
 
     QPalette resolvedpalette = option.palette.resolve(QApplication::palette("QMenu"));
     QVariant value = index.data(Qt::ForegroundRole);
@@ -182,13 +227,16 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt
     QVariant fontRoleData = index.data(Qt::FontRole);
     if (fontRoleData.isValid()) {
         menuOption.font = fontRoleData.value<QFont>();
+        qDebug() << "QComboMenuDelegate::getStyleOption Qt::FontRole font="  << menuOption.font;
     } else if (mCombo->testAttribute(Qt::WA_SetFont)
             || mCombo->testAttribute(Qt::WA_MacSmallSize)
             || mCombo->testAttribute(Qt::WA_MacMiniSize)
             || mCombo->font() != qt_app_fonts_hash()->value("QComboBox", QFont())) {
         menuOption.font = mCombo->font();
+        qDebug() << "QComboMenuDelegate::getStyleOption font="  << menuOption.font;
     } else {
         menuOption.font = qt_app_fonts_hash()->value("QComboMenuItem", mCombo->font());
+        qDebug() << "QComboMenuDelegate::getStyleOption QComboMenuItem-font="  << menuOption.font;
     }
 
     menuOption.fontMetrics = QFontMetrics(menuOption.font);
@@ -328,11 +376,13 @@ int QComboBoxPrivate::computeWidthHint() const
 QSize QComboBoxPrivate::recomputeSizeHint(QSize &sh) const
 {
     Q_Q(const QComboBox);
+    qDebug() << __FUNCTION__ << q;
     if (!sh.isValid()) {
         bool hasIcon = sizeAdjustPolicy == QComboBox::AdjustToMinimumContentsLengthWithIcon;
         int count = q->count();
         QSize iconSize = q->iconSize();
         const QFontMetrics &fm = q->fontMetrics();
+        qDebug() << __FUNCTION__ << fm.height();
 
         // text width
         if (&sh == &sizeHint || minimumContentsLength == 0) {
@@ -377,11 +427,14 @@ QSize QComboBoxPrivate::recomputeSizeHint(QSize &sh) const
         q->initStyleOption(&opt);
         sh = q->style()->sizeFromContents(QStyle::CT_ComboBox, &opt, sh, q);
     }
-    return sh.expandedTo(QApplication::globalStrut());
+    auto r  = sh.expandedTo(QApplication::globalStrut());
+    qDebug() << __FUNCTION__ << "rets" <<  sh << r;
+    return r;
 }
 
 void QComboBoxPrivate::adjustComboBoxSize()
 {
+    qDebug() << __FUNCTION__ << q_func();
     viewContainer()->adjustSizeTimer.start(20, container);
 }
 
@@ -476,6 +529,7 @@ QComboBoxPrivateContainer::QComboBoxPrivateContainer(QAbstractItemView *itemView
     // add scroller arrows if style needs them
     QStyleOptionComboBox opt = comboStyleOption();
     const bool usePopup = combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo);
+    qDebug() << __FUNCTION__ << parent << "usePopup=" << usePopup;
     if (usePopup) {
         top = new QComboBoxPrivateScroller(QAbstractSlider::SliderSingleStepSub, this);
         bottom = new QComboBoxPrivateScroller(QAbstractSlider::SliderSingleStepAdd, this);
@@ -575,6 +629,9 @@ QAbstractItemView *QComboBoxPrivateContainer::itemView() const
 */
 void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView)
 {
+
+    itemView->setObjectName(combo->objectName() + QLatin1String("LV"));
+    qDebug() << __FUNCTION__ << combo << itemView;
     Q_ASSERT(itemView);
 
     // clean up old one
@@ -3544,3 +3601,15 @@ QT_END_NAMESPACE
 
 #include "moc_qcombobox.cpp"
 #include "moc_qcombobox_p.cpp"
+
+
+QSize QComboBoxDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
+    qDebug() << __FUNCTION__ << option.widget;
+    if (isSeparator(index)) {
+        int pm = mCombo->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, mCombo);
+        return QSize(pm, pm);
+    }
+    auto r =  QItemDelegate::sizeHint(option, index);
+    qDebug() << "QComboBoxDelegate::sizeHint" << mCombo << mCombo->style() << "rets" << r;
+    return r;
+}
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h
index 3f75a357e4..cf1d77f3a0 100644
--- a/src/widgets/widgets/qcombobox_p.h
+++ b/src/widgets/widgets/qcombobox_p.h
@@ -86,7 +86,7 @@ class QComboBoxListView : public QListView
 {
     Q_OBJECT
 public:
-    QComboBoxListView(QComboBox *cmb = 0) : combo(cmb) {}
+    QComboBoxListView(QComboBox *cmb = 0);
 
 protected:
     void resizeEvent(QResizeEvent *event) override
@@ -104,28 +104,7 @@ protected:
         return option;
     }
 
-    void paintEvent(QPaintEvent *e) override
-    {
-        if (combo) {
-            QStyleOptionComboBox opt;
-            opt.initFrom(combo);
-            opt.editable = combo->isEditable();
-            if (combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo)) {
-                //we paint the empty menu area to avoid having blank space that can happen when scrolling
-                QStyleOptionMenuItem menuOpt;
-                menuOpt.initFrom(this);
-                menuOpt.palette = palette();
-                menuOpt.state = QStyle::State_None;
-                menuOpt.checkType = QStyleOptionMenuItem::NotCheckable;
-                menuOpt.menuRect = e->rect();
-                menuOpt.maxIconWidth = 0;
-                menuOpt.tabWidth = 0;
-                QPainter p(viewport());
-                combo->style()->drawControl(QStyle::CE_MenuEmptyArea, &menuOpt, &p, this);
-            }
-        }
-        QListView::paintEvent(e);
-    }
+    void paintEvent(QPaintEvent *e) override;
 
 private:
     QComboBox *combo;
@@ -281,11 +260,7 @@ protected:
         mCombo->style()->drawControl(QStyle::CE_MenuItem, &opt, painter, mCombo);
     }
     QSize sizeHint(const QStyleOptionViewItem &option,
-                   const QModelIndex &index) const override {
-        QStyleOptionMenuItem opt = getStyleOption(option, index);
-        return mCombo->style()->sizeFromContents(
-            QStyle::CT_MenuItem, &opt, option.rect.size(), mCombo);
-    }
+                   const QModelIndex &index) const override;
 
 private:
     QStyleOptionMenuItem getStyleOption(const QStyleOptionViewItem &option,
@@ -328,13 +303,7 @@ protected:
     }
 
     QSize sizeHint(const QStyleOptionViewItem &option,
-                   const QModelIndex &index) const override {
-        if (isSeparator(index)) {
-            int pm = mCombo->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, mCombo);
-            return QSize(pm, pm);
-        }
-        return QItemDelegate::sizeHint(option, index);
-    }
+                   const QModelIndex &index) const override;
 private:
     QComboBox *mCombo;
 };
