diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qwindow.h | 13 |
1 files changed, 13 insertions, 0 deletions
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<QWindow*>(QObject *o) +{ + if (!o || !o->isWindowType()) return 0; + return static_cast<QWindow*>(o); +} +template <> inline const QWindow *qobject_cast<const QWindow*>(const QObject *o) +{ + if (!o || !o->isWindowType()) return 0; + return static_cast<const QWindow*>(o); +} +#endif // !Q_QDOC + QT_END_NAMESPACE #endif // QWINDOW_H |