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:
zeljko 2010-07-21 09:46:43 +00:00
parent d5c10dfaa2
commit 3d8f047dc7

View File

@ -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);