diff --git a/lcl/interfaces/qt/qtobject.inc b/lcl/interfaces/qt/qtobject.inc index 580d04e324..82b3de678b 100644 --- a/lcl/interfaces/qt/qtobject.inc +++ b/lcl/interfaces/qt/qtobject.inc @@ -1184,7 +1184,11 @@ begin end; end else - NewWidget.DeliverMessage(Msg); + begin + if Assigned(NewWidget.LCLObject) and (GetParentForm(NewWidget.LCLObject) <> nil) and + GetParentForm(NewWidget.LCLObject).Visible then + NewWidget.DeliverMessage(Msg); + end; end; end;