Qt5, Qt6: fixed PopupParent = modal form, issue #41241

(cherry picked from commit 9ba7c6e286)

Co-authored-by: Željan Rikalo <zeljko@lazarus-ide.org>
This commit is contained in:
Željan Rikalo 2024-11-14 12:56:26 +00:00 committed by Željan Rikalo
parent 5b60a5e128
commit 194bd07f82
2 changed files with 2 additions and 6 deletions

View File

@ -630,8 +630,7 @@ begin
if (APopupParent <> nil) then if (APopupParent <> nil) then
begin begin
Widget.setParent(TQtWidget(APopupParent.Handle).Widget); Widget.setParent(TQtWidget(APopupParent.Handle).Widget);
{use direct X11 call instead of QtTool flag.issue #29253} Widget.setWindowFlags(Widget.windowFlags or QtDialog); // issue #41241
SetTransientForHint(Widget.Widget, TQtWidget(APopupParent.Handle).Widget);
end; end;
end; end;
{$ENDIF} {$ENDIF}

View File

@ -627,10 +627,7 @@ begin
if (APopupParent <> nil) then if (APopupParent <> nil) then
begin begin
Widget.setParent(TQtWidget(APopupParent.Handle).Widget); Widget.setParent(TQtWidget(APopupParent.Handle).Widget);
{use direct X11 call instead of QtTool flag.issue #29253} Widget.setWindowFlags(Widget.windowFlags or QtDialog); // issue #41241
//SetTransientForHint(Widget.Widget, TQtWidget(APopupParent.Handle).Widget);
{$note check if this is good supplement for SetTransientForHint}
// QWindow_setTransientParent(Widget.WindowHandle, TQtWidget(APopupParent.Handle).WindowHandle);
end; end;
end; end;
{$ENDIF} {$ENDIF}