diff --git a/src/widgets/effects/qgraphicseffect.cpp b/src/widgets/effects/qgraphicseffect.cpp
index 4d1d1e9..7c15dd2 100644
--- a/src/widgets/effects/qgraphicseffect.cpp
+++ b/src/widgets/effects/qgraphicseffect.cpp
@@ -219,6 +219,12 @@ const QStyleOption *QGraphicsEffectSource::styleOption() const
 */
 void QGraphicsEffectSource::draw(QPainter *painter)
 {
+    QPaintDevice *pdev = painter->device();
+    qDebug() << __FUNCTION__ << this << widget() << "painter=" << painter
+             << painter->isActive()
+             << "dev=" << pdev << (pdev ? pdev->devType() : -1);
+
+
     Q_D(const QGraphicsEffectSource);
 
     QPixmap pm;
@@ -252,6 +258,7 @@ void QGraphicsEffectSource::draw(QPainter *painter)
 void QGraphicsEffect::drawSource(QPainter *painter)
 {
     Q_D(const QGraphicsEffect);
+    qDebug() << __FUNCTION__ << this << painter << "d->source" << d->source;
     if (d->source)
         d->source->draw(painter);
 }
@@ -1190,6 +1197,7 @@ void QGraphicsOpacityEffect::setOpacityMask(const QBrush &mask)
 void QGraphicsOpacityEffect::draw(QPainter *painter)
 {
     Q_D(QGraphicsOpacityEffect);
+    qDebug() << __FUNCTION__ << this << "painter=" << painter ;
 
     // Transparent; nothing to draw.
     if (d->isFullyTransparent)
@@ -1197,10 +1205,13 @@ void QGraphicsOpacityEffect::draw(QPainter *painter)
 
     // Opaque; draw directly without going through a pixmap.
     if (d->isFullyOpaque && !d->hasOpacityMask) {
+        qDebug() << __FUNCTION__ << "op";
         drawSource(painter);
         return;
     }
 
+    qDebug() << __FUNCTION__ << "non-oqaque";
+
     QPoint offset;
     Qt::CoordinateSystem system = sourceIsPixmap() ? Qt::LogicalCoordinates : Qt::DeviceCoordinates;
     QPixmap pixmap = sourcePixmap(system, &offset, QGraphicsEffect::NoPad);
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 7e9e4f0..4841a29 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5493,17 +5493,23 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
 
     const bool asRoot = flags & DrawAsRoot;
     bool onScreen = paintOnScreen();
-
     Q_Q(QWidget);
+    qDebug() << " QWidgetPrivate::drawWidget" << q << "pdev=" << pdev
+             << ",type=" << pdev->devType() << "sharedPainter="
+             << sharedPainter;
+
+
 #ifndef QT_NO_GRAPHICSEFFECT
     if (graphicsEffect && graphicsEffect->isEnabled()) {
         QGraphicsEffectSource *source = graphicsEffect->d_func()->source;
         QWidgetEffectSourcePrivate *sourced = static_cast<QWidgetEffectSourcePrivate *>
                                                          (source->d_func());
         if (!sourced->context) {
+            qDebug() << q << "QWidgetPrivate::drawWidget sourced->context==0";
             QWidgetPaintContext context(pdev, rgn, offset, flags, sharedPainter, backingStore);
             sourced->context = &context;
             if (!sharedPainter) {
+                qDebug() << q << "QWidgetPrivate::drawWidget sharedPainter==0";
                 setSystemClip(pdev, rgn.translated(offset));
                 QPainter p(pdev);
                 p.translate(offset);
@@ -5511,6 +5517,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
                 graphicsEffect->draw(&p);
                 setSystemClip(pdev, QRegion());
             } else {
+                qDebug() << q << "QWidgetPrivate::drawWidget using sharedPainter";
                 context.painter = sharedPainter;
                 if (sharedPainter->worldTransform() != sourced->lastEffectTransform) {
                     sourced->invalidateCache();
@@ -5533,6 +5540,8 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
     }
 #endif //QT_NO_GRAPHICSEFFECT
 
+    qDebug() << " QWidgetPrivate::drawWidget" << q << "no effect";
+
     const bool alsoOnScreen = flags & DrawPaintOnScreen;
     const bool recursive = flags & DrawRecursive;
     const bool alsoInvisible = flags & DrawInvisible;
@@ -5853,11 +5862,15 @@ QRectF QWidgetEffectSourcePrivate::boundingRect(Qt::CoordinateSystem system) con
 
 void QWidgetEffectSourcePrivate::draw(QPainter *painter)
 {
+    qDebug() << "QWidgetEffectSourcePrivate::draw" << m_widget << "painter=" << painter;
     if (!context || context->painter != painter) {
+        qDebug() << "QWidgetEffectSourcePrivate::draw: render";
         m_widget->render(painter);
         return;
     }
 
+    qDebug() << "QWidgetEffectSourcePrivate::draw: drawWidget";
+
     // The region saved in the context is neither clipped to the rect
     // nor the mask, so we have to clip it here before calling drawWidget.
     QRegion toBePainted = context->rgn;
