[Qt] FPC Qt4 Binding V1.39
Den Jean
Den.Jean at telenet.be
Wed Jul 4 19:24:41 CEST 2007
On Wednesday 04 July 2007 09:44:27 am zeljko wrote:
> No, Den it cannot work since we don't have anything like that in our qt-lcl
> code. There's call to SlotClose() (which sends message to LCL) and that's
> it. I didn't found any way how to catch some result from SlotClose().
It also expected that you read/need the result from delivermessage, but a test
revealed that the result is not different with CanClose True or False in a
FormCloseQuery.
The design of SlotClose is up to you/Felipe.
Probably with the "cdecl" Felipe wanted one day to connect stuff to these Qt
compatible slots. But you can change it to a function and add parameters if
you want.
Here's a patch that implements CloseQuery:
Tested by creating an App with a Form with a CheckBox ECanClose.
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
CanClose:=ECanClose.Checked;
end;
The delivermessage and the convenience functions (LCLSendCloseQueryMsg) of
LCLMessageGlue are really nice. I would really like that you overall use these
functions. It would reduce the size of QtWidgets.pas.
kind regards,
Den Jean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r11412_CloseQuery.diff
Type: text/x-diff
Size: 1172 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/qt/attachments/20070704/8ea64bbc/attachment.diff>
More information about the Qt
mailing list