diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index dc09155438..803d1efc0d 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2978,7 +2978,8 @@ bool QApplication::notify(QObject *receiver, QEvent *e) d->checkReceiverThread(receiver); #endif - QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(qobject_cast(receiver), e); + if (receiver->isWindowType()) + QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast(receiver), e); // capture the current mouse/keyboard state if(e->spontaneous()) {