diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 1840550ee4..4342f970c0 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -4060,6 +4060,7 @@ void QGuiApplication::changeOverrideCursor(const QCursor &cursor)
 #ifndef QT_NO_CURSOR
 static inline void applyCursor(QWindow *w, QCursor c)
 {
+    qDebug() << "guiapp" << __FUNCTION__ << w << c;
     if (const QScreen *screen = w->screen())
         if (QPlatformCursor *cursor = screen->handle()->cursor())
             cursor->changeCursor(&c, w);
@@ -4067,6 +4068,7 @@ static inline void applyCursor(QWindow *w, QCursor c)
 
 static inline void unsetCursor(QWindow *w)
 {
+    qDebug() << "guiapp" << __FUNCTION__ << w;
     if (const QScreen *screen = w->screen())
         if (QPlatformCursor *cursor = screen->handle()->cursor())
             cursor->changeCursor(nullptr, w);
@@ -4083,6 +4085,7 @@ static inline void applyCursor(const QList<QWindow *> &l, const QCursor &c)
 
 static inline void applyOverrideCursor(const QList<QScreen *> &screens, const QCursor &c)
 {
+    qDebug() << "guiapp" << __FUNCTION__ << c;
     for (QScreen *screen : screens) {
         if (QPlatformCursor *cursor = screen->handle()->cursor())
             cursor->setOverrideCursor(c);
@@ -4091,6 +4094,7 @@ static inline void applyOverrideCursor(const QList<QScreen *> &screens, const QC
 
 static inline void clearOverrideCursor(const QList<QScreen *> &screens)
 {
+    qDebug() << "guiapp" << __FUNCTION__;
     for (QScreen *screen : screens) {
         if (QPlatformCursor *cursor = screen->handle()->cursor())
             cursor->clearOverrideCursor();
@@ -4099,10 +4103,13 @@ static inline void clearOverrideCursor(const QList<QScreen *> &screens)
 
 static inline void applyWindowCursor(const QList<QWindow *> &l)
 {
+    qDebug() << "guiapp" << __FUNCTION__;
     for (int i = 0; i < l.size(); ++i) {
         QWindow *w = l.at(i);
         if (w->handle() && w->type() != Qt::Desktop) {
-            if (qt_window_private(w)->hasCursor) {
+            bool hc = qt_window_private(w)->hasCursor;
+            qDebug() << "guiapp" << __FUNCTION__ << w << "has" << hc;
+            if (hc) {
                 applyCursor(w, w->cursor());
             } else {
                 unsetCursor(w);
@@ -4141,10 +4148,13 @@ void QGuiApplication::setOverrideCursor(const QCursor &cursor)
 {
     CHECK_QAPP_INSTANCE()
     qGuiApp->d_func()->cursor_list.prepend(cursor);
-    if (QPlatformCursor::capabilities().testFlag(QPlatformCursor::OverrideCursor))
+    if (QPlatformCursor::capabilities().testFlag(QPlatformCursor::OverrideCursor)) {
+        qDebug() << __FUNCTION__ << "has QPlatformCursor::OverrideCursor";
         applyOverrideCursor(QGuiApplicationPrivate::screen_list, cursor);
-    else
+    } else {
+        qDebug() << __FUNCTION__ << "no QPlatformCursor::OverrideCursor";
         applyCursor(QGuiApplicationPrivate::window_list, cursor);
+    }
 }
 
 /*!
@@ -4160,6 +4170,7 @@ void QGuiApplication::setOverrideCursor(const QCursor &cursor)
 */
 void QGuiApplication::restoreOverrideCursor()
 {
+    qDebug() << __FUNCTION__;
     CHECK_QAPP_INSTANCE()
     if (qGuiApp->d_func()->cursor_list.isEmpty())
         return;
@@ -4171,6 +4182,7 @@ void QGuiApplication::restoreOverrideCursor()
         else
             applyCursor(QGuiApplicationPrivate::window_list, c);
     } else {
+        qDebug() << __FUNCTION__ << "clearing";
         if (QPlatformCursor::capabilities().testFlag(QPlatformCursor::OverrideCursor))
             clearOverrideCursor(QGuiApplicationPrivate::screen_list);
         applyWindowCursor(QGuiApplicationPrivate::window_list);
diff --git a/src/plugins/platforms/windows/qwindowscursor.cpp b/src/plugins/platforms/windows/qwindowscursor.cpp
index af1cb5d586..9cf1418dda 100644
--- a/src/plugins/platforms/windows/qwindowscursor.cpp
+++ b/src/plugins/platforms/windows/qwindowscursor.cpp
@@ -65,6 +65,8 @@ static bool initResources()
 
 QT_BEGIN_NAMESPACE
 
+static const QWindowsCursor::StandardCursorCache *stdCache{};
+
 Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0);
 Q_GUI_EXPORT HBITMAP qt_createIconMask(const QBitmap &bitmap);
 
@@ -589,6 +591,7 @@ QWindowsCursor::QWindowsCursor(const QPlatformScreen *screen)
 {
     static const bool dummy = initResources();
     Q_UNUSED(dummy)
+    stdCache = &m_standardCursorCache;
 }
 
 inline CursorHandlePtr QWindowsCursor::cursorHandle(const QCursor &cursor)
@@ -638,6 +641,7 @@ void QWindowsCursor::setOverrideCursor(const QCursor &cursor)
     if (const auto overrideCursor = wcursor->handle()) {
         m_overrideCursor = overrideCursor;
         const HCURSOR previousCursor = SetCursor(overrideCursor);
+        qDebug() << __FUNCTION__ << overrideCursor << "previousCursor=" << previousCursor;
         if (m_overriddenCursor == nullptr)
             m_overriddenCursor = previousCursor;
     } else {
@@ -649,6 +653,7 @@ void QWindowsCursor::setOverrideCursor(const QCursor &cursor)
 void QWindowsCursor::clearOverrideCursor()
 {
     if (m_overriddenCursor) {
+        qDebug() << __FUNCTION__ << m_overriddenCursor;
         SetCursor(m_overriddenCursor);
         m_overriddenCursor = m_overrideCursor = nullptr;
     }
@@ -817,6 +822,22 @@ HCURSOR QWindowsCursor::hCursor(const QCursor &c) const
     \sa QWindowsCursor
 */
 
+QDebug operator<<(QDebug d, HCURSOR hc)
+{
+    QDebugStateSaver s(d);
+    d.noquote();
+    d.nospace();
+    d << "HCURSOR(" << static_cast<const void *>(hc);
+    for (auto i = stdCache->cbegin(), e = stdCache->cend(); i != e; ++i) {
+        if (i.value()->handle() == hc) {
+            d << ", " << i.key();
+            break;
+        }
+    }
+    d << ')';
+    return d;
+}
+
 QT_END_NAMESPACE
 
 #endif // !QT_NO_CURSOR
diff --git a/src/plugins/platforms/windows/qwindowscursor.h b/src/plugins/platforms/windows/qwindowscursor.h
index 5ee7b37cc5..a3bb88b8fb 100644
--- a/src/plugins/platforms/windows/qwindowscursor.h
+++ b/src/plugins/platforms/windows/qwindowscursor.h
@@ -46,6 +46,8 @@
 #include <QtCore/qsharedpointer.h>
 #include <QtCore/qhash.h>
 
+QT_FORWARD_DECLARE_CLASS(QDebug)
+
 QT_BEGIN_NAMESPACE
 
 struct QWindowsPixmapCursorCacheKey
@@ -89,6 +91,9 @@ using CursorHandlePtr = QSharedPointer<CursorHandle>;
 class QWindowsCursor : public QPlatformCursor
 {
 public:
+    typedef QHash<Qt::CursorShape, CursorHandlePtr> StandardCursorCache;
+
+
     enum class State {
         Showing,
         Hidden,
@@ -131,7 +136,6 @@ public:
     HCURSOR hCursor(const QCursor &c) const;
 
 private:
-    typedef QHash<Qt::CursorShape, CursorHandlePtr> StandardCursorCache;
     typedef QHash<QWindowsPixmapCursorCacheKey, CursorHandlePtr> PixmapCursorCache;
 
     CursorHandlePtr cursorHandle(const QCursor &c);
@@ -149,6 +153,8 @@ private:
     static HCURSOR m_overrideCursor;
 };
 
+QDebug operator<<(QDebug d, HCURSOR hc);
+
 QT_END_NAMESPACE
 
 #endif // QWINDOWSCURSOR_H
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 22551ba26e..a76882f919 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -2798,7 +2798,9 @@ static inline bool applyNewCursor(const QWindow *w)
 
 void QWindowsWindow::applyCursor()
 {
+    qDebug() << __FUNCTION__ << window();
     if (QWindowsCursor::hasOverrideCursor()) {
+        qDebug() << __FUNCTION__ << "hasOverrideCursor";
         if (isTopLevel())
             QWindowsCursor::enforceOverrideCursor();
         return;
@@ -2806,23 +2808,31 @@ void QWindowsWindow::applyCursor()
 #ifndef QT_NO_CURSOR
     if (m_cursor->isNull()) { // Recurse up to parent with non-null cursor. Set default for toplevel.
         if (const QWindow *p = window()->parent()) {
+            qDebug() << __FUNCTION__ << "recurse up to parent";
             if (QWindowsWindow *platformWindow = QWindowsWindow::windowsWindowOf(p))
                 platformWindow->applyCursor();
         } else {
-            SetCursor(defaultCursor(window())->handle());
+            auto h = defaultCursor(window())->handle();
+            qDebug() << __FUNCTION__ << window() << "default" << h;
+            SetCursor(h);
         }
     } else {
-        SetCursor(m_cursor->handle());
+        auto h = m_cursor->handle();
+        qDebug() << __FUNCTION__ << window() << "window cur:"  << h;
+        SetCursor(h);
     }
 #endif
 }
 
 void QWindowsWindow::setCursor(const CursorHandlePtr &c)
 {
+    const bool chg = c->handle() != m_cursor->handle();
+    qDebug() << __FUNCTION__ << window() << c->handle()
+             << "changed=" << chg;
 #ifndef QT_NO_CURSOR
-    if (c->handle() != m_cursor->handle()) {
+    if (chg) {
         const bool apply = applyNewCursor(window());
-        qCDebug(lcQpaWindows) << window() << __FUNCTION__
+        qDebug() << window() << __FUNCTION__
             << c->handle() << " doApply=" << apply;
         m_cursor = c;
         if (apply)
