diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index 1770e60c2e1..dc35dee1a98 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -92,8 +92,11 @@ public: Q_Q(QWindowContainer); QWidget *p = q->parentWidget(); while (p) { - if (qobject_cast(p) != 0 - || qobject_cast(p) != 0) { + if ( +#ifndef QT_NO_MDIAREA + qobject_cast(p) != 0 || +#endif + qobject_cast(p) != 0) { q->winId(); usesNativeWidgets = true; break;