mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 23:19:29 +02:00
Qt: allow non spontaneous key event for IQtEdit.
git-svn-id: trunk@26555 -
This commit is contained in:
parent
6efdaf05ea
commit
158bd528ca
@ -1993,6 +1993,7 @@ function TQtWidget.EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl
|
||||
var
|
||||
QColor, OldColor: TQColor;
|
||||
Color: TColor;
|
||||
QtEdit: IQtEdit;
|
||||
begin
|
||||
BeginEventProcessing;
|
||||
Result := False;
|
||||
@ -2036,8 +2037,8 @@ begin
|
||||
QEventKeyPress,
|
||||
QEventKeyRelease:
|
||||
begin
|
||||
{non-spontaneous key events are garbage in Qt >= 4.4}
|
||||
Result := QEvent_spontaneous(Event);
|
||||
{non-spontaneous key events are garbage in Qt >= 4.4 for non edits}
|
||||
Result := QEvent_spontaneous(Event) or Supports(Self, IQtEdit, QtEdit);
|
||||
if Result then
|
||||
Result := SlotKey(Sender, Event) or (LCLObject is TCustomControl);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user