diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 7cd25b010f..473d275b56 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -356,6 +356,19 @@ private: friend Q_GUI_EXPORT QWindowPrivate *qt_window_private(QWindow *window); }; +#ifndef Q_QDOC +template <> inline QWindow *qobject_cast(QObject *o) +{ + if (!o || !o->isWindowType()) return 0; + return static_cast(o); +} +template <> inline const QWindow *qobject_cast(const QObject *o) +{ + if (!o || !o->isWindowType()) return 0; + return static_cast(o); +} +#endif // !Q_QDOC + QT_END_NAMESPACE #endif // QWINDOW_H