diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 22ad748..df09492 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1946,6 +1946,7 @@ void QWindowPrivate::maybeQuitOnLastWindowClosed()
 */
 void QWindow::setCursor(const QCursor &cursor)
 {
+    qDebug() << Q_FUNC_INFO << this << cursor;
     Q_D(QWindow);
     d->cursor = cursor;
     // Only attempt to set cursor and emit signal if there is an actual platform cursor
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index e2843d0..1ef2e94 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -50,6 +50,7 @@
 #include <X11/cursorfont.h>
 #include <xcb/xfixes.h>
 #include <xcb/xcb_image.h>
+#include <QDebug>
 
 QT_BEGIN_NAMESPACE
 
@@ -294,6 +295,7 @@ QXcbCursor::~QXcbCursor()
 #ifndef QT_NO_CURSOR
 void QXcbCursor::changeCursor(QCursor *cursor, QWindow *widget)
 {
+    qDebug() << '>' << Q_FUNC_INFO << *cursor << widget;
     QXcbWindow *w = 0;
     if (widget && widget->handle())
         w = static_cast<QXcbWindow *>(widget->handle());
@@ -307,14 +309,17 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *widget)
         if (!m_bitmapCursorMap.contains(id))
             m_bitmapCursorMap.insert(id, createBitmapCursor(cursor));
         c = m_bitmapCursorMap.value(id);
+        qDebug() << "created bitmap cursor" << c;
     } else {
         int id = cursor->shape();
         if (!m_shapeCursorMap.contains(id))
             m_shapeCursorMap.insert(id, createFontCursor(cursor->shape()));
         c = m_shapeCursorMap.value(id);
+        qDebug() << "created shape cursor" << c;
     }
 
     w->setCursor(c);
+    qDebug() << '<' << Q_FUNC_INFO << *cursor << widget;
 }
 
 static int cursorIdForShape(int cshape)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 528c4c6..39679f4 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -1710,6 +1710,7 @@ bool QXcbWindow::setMouseGrabEnabled(bool grab)
 
 void QXcbWindow::setCursor(xcb_cursor_t cursor)
 {
+    qDebug() << Q_FUNC_INFO << m_window << window() << cursor;
     xcb_change_window_attributes(xcb_connection(), m_window, XCB_CW_CURSOR, &cursor);
     xcb_flush(xcb_connection());
 }
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index ecf73ee..f5c8179 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -4565,6 +4565,7 @@ QCursor QWidget::cursor() const
 
 void QWidget::setCursor(const QCursor &cursor)
 {
+    qDebug() << Q_FUNC_INFO << this << cursor;
     Q_D(QWidget);
 // On Mac we must set the cursor even if it is the ArrowCursor.
 #if !defined(Q_WS_MAC)
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 2aee80a..06be2e0 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -995,12 +995,14 @@ void QWidgetPrivate::setModal_sys()
 #ifndef QT_NO_CURSOR
 static inline void applyCursor(QWidget *w, QCursor c)
 {
+    qDebug() << Q_FUNC_INFO << w << c;
     if (QWindow *window = w->windowHandle())
         window->setCursor(c);
 }
 
 void qt_qpa_set_cursor(QWidget *w, bool force)
 {
+    qDebug() << '>' << __FUNCTION__ << w << force;
     if (!w->testAttribute(Qt::WA_WState_Created))
         return;
 
@@ -1025,17 +1027,20 @@ void qt_qpa_set_cursor(QWidget *w, bool force)
         nativeParent = w->nativeParentWidget();
     if (!nativeParent || !nativeParent->internalWinId())
         return;
+    qDebug() << __FUNCTION__  << "nativeParent: " << nativeParent << " w: " << w;
 
     if (w->isWindow() || w->testAttribute(Qt::WA_SetCursor)) {
-        if (w->isEnabled())
+        if (w->isEnabled()) {
+            qDebug() <<  __FUNCTION__ << "applying" << w->cursor() <<" to nativeParent: " << nativeParent;
             applyCursor(nativeParent, w->cursor());
-        else
+        } else
             // Enforce the windows behavior of clearing the cursor on
             // disabled widgets.
             applyCursor(nativeParent, Qt::ArrowCursor);
     } else {
         applyCursor(nativeParent, Qt::ArrowCursor);
     }
+    qDebug() << '<' <<__FUNCTION__ << w << force;
 }
 #endif //QT_NO_CURSOR 
 
