From 45854c75aa0f090151f868ea3680c4b7490a3f4b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 15 Jul 2014 11:04:07 +0200 Subject: QGroupBox: Exclude top level widgets from child event handling. Prevent the QGroupBox from changing the enabled state of dialogs parented on it. Task-number: QTBUG-40132 Change-Id: I91cc6ccf5ade0b3a491020ed947d4aceca62d7b6 Reviewed-by: J-P Nurmi --- src/widgets/widgets/qgroupbox.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp index 168f0bbd67..42b0c68971 100644 --- a/src/widgets/widgets/qgroupbox.cpp +++ b/src/widgets/widgets/qgroupbox.cpp @@ -405,6 +405,8 @@ void QGroupBox::childEvent(QChildEvent *c) if (c->type() != QEvent::ChildAdded || !c->child()->isWidgetType()) return; QWidget *w = (QWidget*)c->child(); + if (w->isWindow()) + return; if (d->checkable) { if (d->checked) { if (!w->testAttribute(Qt::WA_ForceDisabled)) -- cgit v1.2.3