Felipe Monteiro de Carvalho ha scritto:
Hello,
I am trying to implement all key events for the Qt widgetset. I used
the code on win32 as a model, but a very simple thing doesn't work here.
Qt events are processed correctly and it enters the SlotKey procedure,
because I can see the WriteLn, but the OnKeyUp event of the form is
never executed. So I assume something is wrong inside my SlotKey
procedure, but I don't know what.
Here is my event on the form:
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift:
TShiftState);
begin
WriteLn('KeyUp' + IntToStr(Key)); // I cannot see this
end;
Here is my Qt code:
{------------------------------------------------------------------------------
Function: TQtWidget.SlotKey
Params: None
Returns: Nothing
------------------------------------------------------------------------------}
procedure TQtWidget.SlotKey(Event: QEventH); cdecl;
var
Msg: TLMKey;
SecondMsg: TLMKey;
begin
WriteLn('SlotKey'); // I can see this
FillChar(Msg, SizeOf(Msg), #0);
if QEvent_type(Event) = QEventKeyRelease then Msg.Msg := LM_KEYUP
Maybe it's just a stupid suggestion, but sometimes we don't look to the
most obvious things.
Are you sure that QEventKeyRelease has the right value? (It should be 7
if I'm not wrong)
Cheers,
Giuliano
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives