diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 2a0cb1094c..60655b97f4 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -47,7 +47,7 @@
 #include <QtGui/qscreen.h>
 #include <private/qhighdpiscaling_p.h>
 #include <private/qwindow_p.h>
-
+#include <QDebug>
 
 QT_BEGIN_NAMESPACE
 
@@ -648,9 +648,12 @@ static inline const QScreen *effectiveScreen(const QWindow *window)
     const QList<QScreen *> siblings = screen->virtualSiblings();
     if (siblings.size() > 1) {
         const QPoint referencePoint = window->transientParent() ? window->transientParent()->geometry().center() : QCursor::pos();
+        qDebug() << __FUNCTION__ << "ref point from cursor" << referencePoint;
         for (const QScreen *sibling : siblings) {
-            if (sibling->geometry().contains(referencePoint))
+            if (sibling->geometry().contains(referencePoint)) {
+                qDebug() << __FUNCTION__ << "rets " << sibling;
                 return sibling;
+            }
         }
     }
 #endif
@@ -697,6 +700,8 @@ static QSize fixInitialSize(QSize size, const QWindow *w,
 QRect QPlatformWindow::initialGeometry(const QWindow *w,
     const QRect &initialGeometry, int defaultWidth, int defaultHeight)
 {
+    qDebug() << '\n' << __FUNCTION__ << w << w->isTopLevel() << w->screen()->name()
+             << initialGeometry;
     if (!w->isTopLevel()) {
         const qreal factor = QHighDpiScaling::factor(w);
         const QSize size = fixInitialSize(QHighDpi::fromNative(initialGeometry.size(), factor),
@@ -718,6 +723,7 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
         rect.setSize(fixInitialSize(rect.size(), w, defaultWidth, defaultHeight));
     if (position) {
         const QRect availableGeometry = screen->availableGeometry();
+          qDebug() << __FUNCTION__ << "av=" << availableGeometry << screen;
         // Center unless the geometry ( + unknown window frame) is too large for the screen).
         if (rect.height() < (availableGeometry.height() * 8) / 9
                 && rect.width() < (availableGeometry.width() * 8) / 9) {
@@ -732,7 +738,9 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
             }
         }
     }
-    return QHighDpi::toNativePixels(rect, screen);
+    auto  r= QHighDpi::toNativePixels(rect, screen);
+    qDebug() << __FUNCTION__ << w << "rets" << r << screen->name() << '\n';
+     return r;
 }
 
 /*!
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index b71a0c54aa..441226d8a9 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -159,6 +159,7 @@ QWindow::QWindow(QScreen *targetScreen)
     : QObject(*new QWindowPrivate(), 0)
     , QSurface(QSurface::Window)
 {
+    qDebug() << __FUNCTION__ << static_cast<const void*>(this) << targetScreen;
     Q_D(QWindow);
     d->init(targetScreen);
 }
@@ -186,6 +187,7 @@ static QWindow *nonDesktopParent(QWindow *parent)
 QWindow::QWindow(QWindow *parent)
     : QWindow(*new QWindowPrivate(), parent)
 {
+    qDebug() << __FUNCTION__ << static_cast<const void*>(this) << "par=" << parent;
 }
 
 /*!
@@ -231,6 +233,7 @@ void QWindowPrivate::init(QScreen *targetScreen)
     Q_Q(QWindow);
 
     parentWindow = static_cast<QWindow *>(q->QObject::parent());
+    qDebug() << __FUNCTION__ << static_cast<const void*>(this) << "par=" << parentWindow;
 
     if (!parentWindow)
         connectToScreen(targetScreen ? targetScreen : QGuiApplication::primaryScreen());
@@ -642,6 +645,7 @@ bool QWindow::isVisible() const
 void QWindow::create()
 {
     Q_D(QWindow);
+    qDebug() << __FUNCTION__ << this << "Parent=" << parent();
     d->create(false);
 }
 
@@ -702,6 +706,7 @@ QWindow *QWindow::parent() const
 */
 void QWindow::setParent(QWindow *parent)
 {
+    qDebug() << __FUNCTION__ << this << "par=" << parent;
     parent = nonDesktopParent(parent);
 
     Q_D(QWindow);
@@ -1656,6 +1661,7 @@ void QWindow::setGeometry(const QRect &rect)
     Q_D(QWindow);
     d->positionAutomatic = false;
     const QRect oldRect = geometry();
+    qDebug() << __FUNCTION__ << this << oldRect << rect;
     if (rect == oldRect)
         return;
 
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 2c5a40a992..23c6f9afa4 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -3498,6 +3498,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
             || window->surfaceType() != QWindow::OpenGLSurface
             || window->requestedFormat() != winFormat)
         {
+            qDebug() << __FUNCTION__ << "creating" << window;
             window->setSurfaceType(QWindow::OpenGLSurface);
             window->setFormat(winFormat);
             window->destroy();
@@ -3877,6 +3878,7 @@ void QGLContext::doneCurrent()
 QGLWidget::QGLWidget(QWidget *parent, const QGLWidget* shareWidget, Qt::WindowFlags f)
     : QWidget(*(new QGLWidgetPrivate), parent, f)
 {
+    qDebug()  << __FUNCTION__ << static_cast<const void *>(this) << "Par=" << parent << f;
     Q_D(QGLWidget);
     d->init(new QGLContext(QGLFormat::defaultFormat(), this), shareWidget);
 }
@@ -3887,6 +3889,7 @@ QGLWidget::QGLWidget(QWidget *parent, const QGLWidget* shareWidget, Qt::WindowFl
 QGLWidget::QGLWidget(QGLWidgetPrivate &dd, const QGLFormat &format, QWidget *parent, const QGLWidget *shareWidget, Qt::WindowFlags f)
     : QWidget(dd, parent, f)
 {
+    qDebug()  << __FUNCTION__ << static_cast<const void *>(this) << "Par=" << parent << "share=" << shareWidget << f;
     Q_D(QGLWidget);
     d->init(new QGLContext(format, this), shareWidget);
 
@@ -5158,7 +5161,9 @@ void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget *shareWidget)
     q->setAutoFillBackground(true); // for compatibility
 
     mustHaveWindowHandle = 1;
+    qDebug()  << __FUNCTION__ << '1' << windowHandle();
     q->setAttribute(Qt::WA_NativeWindow);
+    qDebug()  << __FUNCTION__ << '2' << windowHandle();
     q->setWindowFlag(Qt::MSWindowsOwnDC);
 
     initContext(context, shareWidget);
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index f7d04b667d..6138d6eed6 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -1218,6 +1218,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
         platformWindow->handleResized(static_cast<int>(wParam));
         return true;
     case QtWindows::QuerySizeHints:
+        qDebug() << __FUNCTION__ << msg;
         platformWindow->getSizeHints(reinterpret_cast<MINMAXINFO *>(lParam));
         return true;// maybe available on some SDKs revisit WM_NCCALCSIZE
     case QtWindows::CalculateSize:
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index a4f4099aa6..4c3fba47ff 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -776,8 +776,9 @@ QWindowsWindowData
     QMargins invMargins = topLevel && hasFrame && QWindowsGeometryHint::positionIncludesFrame(w)
             ? invisibleMargins(QPoint(context->frameX, context->frameY)) : QMargins();
 
-    qCDebug(lcQpaWindows).nospace()
-        << "CreateWindowEx: " << w << " class=" << windowClassName << " title=" << title
+    qDebug().nospace().noquote() << __FUNCTION__
+        << " CreateWindowEx: \"" << w->objectName() << "\" on \"" << w->screen()->name()
+        << "\" class=" << windowClassName << " title=" << title
         << '\n' << *this << "\nrequested: " << rect << ": "
         << context->frameWidth << 'x' <<  context->frameHeight
         << '+' << context->frameX << '+' << context->frameY
@@ -802,8 +803,8 @@ QWindowsWindowData
                                  pos.x(), pos.y(),
                                  context->frameWidth, context->frameHeight,
                                  parentHandle, nullptr, appinst, nullptr);
-    qCDebug(lcQpaWindows).nospace()
-        << "CreateWindowEx: returns " << w << ' ' << result.hwnd << " obtained geometry: "
+    qDebug().nospace() << __FUNCTION__
+        << " CreateWindowEx: returns \"" << w->objectName() << "\" " << result.hwnd << " obtained geometry: "
         << context->obtainedPos << context->obtainedSize << ' ' << context->margins;
 
     if (!result.hwnd) {
@@ -1023,7 +1024,9 @@ void QWindowsGeometryHint::applyToMinMaxInfo(const QWindow *w,
     QSize minimumSize;
     QSize maximumSize;
     frameSizeConstraints(w, margins, &minimumSize, &maximumSize);
-    qCDebug(lcQpaWindows).nospace() << '>' << __FUNCTION__ << '<' << " min="
+    qDebug().nospace() << '>' << __FUNCTION__
+        << w << w->screen()
+        << '<' << " min="
         << minimumSize.width() << ',' << minimumSize.height()
         << " max=" << maximumSize.width() << ',' << maximumSize.height()
         << " margins=" << margins
@@ -1713,7 +1716,7 @@ void QWindowsWindow::show_sys() const
 
 void QWindowsWindow::setParent(const QPlatformWindow *newParent)
 {
-    qCDebug(lcQpaWindows) << __FUNCTION__ << window() << newParent;
+    qDebug() << __FUNCTION__ << window() << newParent->window();
 
     if (m_data.hwnd)
         setParent_sys(newParent);
@@ -1967,7 +1970,7 @@ void QWindowsBaseWindow::setGeometry_sys(const QRect &rect) const
     const QMargins margins = fullFrameMargins();
     const QRect frameGeometry = rect + margins;
 
-    qCDebug(lcQpaWindows) << '>' << __FUNCTION__ << window()
+    qDebug() << '>' << __FUNCTION__ << window()
         << "\n from " << geometry_sys() << " frame: "
         << margins << " to " <<rect
         << " new frame: " << frameGeometry;
@@ -2394,6 +2397,7 @@ bool QWindowsWindow::handleGeometryChangingMessage(MSG *message, const QWindow *
     const QRect correctedFrameGeometry = correctedGeometryF.toRect() + margins;
     if (correctedFrameGeometry == suggestedFrameGeometry)
         return false;
+    qDebug() << __FUNCTION__ << qWindow << suggestedFrameGeometry << "corr=" << correctedFrameGeometry;
     windowPos->x = correctedFrameGeometry.left();
     windowPos->y = correctedFrameGeometry.top();
     windowPos->cx = correctedFrameGeometry.width();
@@ -2632,6 +2636,7 @@ static int getBorderWidth(const QPlatformScreen *screen)
 
 void QWindowsWindow::getSizeHints(MINMAXINFO *mmi) const
 {
+    qDebug() << __FUNCTION__;
     // We don't apply the min/max size hint as we change the dpi, because we did not adjust the
     // QScreen of the window yet so we don't have the min/max with the right ratio
     if (!testFlag(QWindowsWindow::WithinDpiChanged))
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index e9968e41b4..81e747079d 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1373,6 +1373,7 @@ static const char activeXNativeParentHandleProperty[] = "_q_embedded_native_pare
 void QWidgetPrivate::createTLSysExtra()
 {
     Q_Q(QWidget);
+    qDebug() << __FUNCTION__ << q;
     if (!extra->topextra->window && (q->testAttribute(Qt::WA_NativeWindow) || q->isWindow())) {
         extra->topextra->window = new QWidgetWindow(q);
         if (extra->minw || extra->minh)
@@ -3942,6 +3943,7 @@ void QWidget::setBaseSize(int basew, int baseh)
 
 void QWidget::setFixedSize(const QSize & s)
 {
+    qDebug() << __FUNCTION__ << this << s;
     setFixedSize(s.width(), s.height());
 }
 
@@ -6938,6 +6940,7 @@ QSize QWidget::frameSize() const
 
 void QWidget::move(const QPoint &p)
 {
+    qDebug() << __FUNCTION__ << this << p;
     Q_D(QWidget);
     setAttribute(Qt::WA_Moved);
     if (testAttribute(Qt::WA_WState_Created)) {
@@ -6998,6 +7001,7 @@ void QWidgetPrivate::fixPosIncludesFrame()
 
 void QWidget::resize(const QSize &s)
 {
+    qDebug() << __FUNCTION__ << this << s;
     Q_D(QWidget);
     setAttribute(Qt::WA_Resized);
     if (testAttribute(Qt::WA_WState_Created)) {
@@ -10997,6 +11001,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
         QCoreApplication::sendEvent(this, &e);
         break; }
     case Qt::WA_NativeWindow: {
+        qDebug() << __FUNCTION__ << this << "WA_NativeWindow";
         d->createTLExtra();
         if (on)
             d->createTLSysExtra();
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 596343c52f..06201d5477 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -160,6 +160,7 @@ QWidgetWindow::QWidgetWindow(QWidget *widget)
     , m_widget(widget)
 {
     updateObjectName();
+    qDebug() << __FUNCTION__ << this;
     // Enable QOpenGLWidget/QQuickWidget children if the platform plugin supports it,
     // and the application developer has not explicitly disabled it.
     if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::RasterGLSurface)
