mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 15:36:10 +02:00
Qt: stop event filter in case when QRadioButton isn't child of TRadioGroup. fixes #16998
git-svn-id: trunk@26762 -
This commit is contained in:
parent
d5c10dfaa2
commit
3d8f047dc7
@ -577,6 +577,7 @@ type
|
||||
public
|
||||
procedure AttachEvents; override;
|
||||
procedure DetachEvents; override;
|
||||
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override;
|
||||
end;
|
||||
|
||||
{ TQtGroupBox }
|
||||
@ -5098,6 +5099,16 @@ begin
|
||||
inherited DetachEvents;
|
||||
end;
|
||||
|
||||
function TQtRadioButton.EventFilter(Sender: QObjectH; Event: QEventH): Boolean;
|
||||
cdecl;
|
||||
begin
|
||||
Result := inherited EventFilter(Sender, Event);
|
||||
if (LCLObject <> nil) and
|
||||
(QEvent_type(Event) in [QEventMouseButtonPress, QEventMouseButtonRelease])
|
||||
then
|
||||
Result := not (LCLObject.Parent is TRadioGroup);
|
||||
end;
|
||||
|
||||
{ TQtGroupBox }
|
||||
|
||||
procedure TQtGroupBox.setLayoutThemeMargins(ALayout: QLayoutH; AWidget: QWidgetH);
|
||||
|
Loading…
Reference in New Issue
Block a user