[Qt] Qt deffered deletion (QObject_deleteLater())
Paul Ishenin
ip at kmiac.ru
Wed Jan 14 08:29:54 CET 2009
zeljko wrote:
> I'll commit it with USE_QT_44 ifdef.
You want to commit even with problems with Timer and PopupMenu?
What about this code:
[code]
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics,
Dialogs,
StdCtrls, LMessages, LCLIntf;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
procedure LM_USER1(var Message: TLMessage); message LM_USER + 1;
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
procedure TForm1.Button1Click(Sender: TObject);
begin
PostMessage(Handle, LM_USER + 1, 0, 0);
end;
procedure TForm1.LM_USER1(var Message: TLMessage);
begin
Button1.Free;
end;
initialization
{$I unit1.lrs}
end.
[/code]
On windows this works. Will it work on qt after your changes (did not
test current version).
Best regards,
Paul Ishenin.
More information about the Qt
mailing list