[Qt] Request for QEvent subclass

Павел Ишенин webpirat at mail.ru
Sat Sep 22 19:30:40 CEST 2007


Hello, Items specific to the Qt widget set

Den, can you add special event class. I know last time my requests are 
not simple, but we are doing not simple things :)

I forgot c++ so I am writing on pascal:

QLCLMessageEvent = class(QEvent)
private
  FMsg: Cardinal;
  FWParam: Cardinal;
  FLParam: Cardinal;
  FResult: Cardinal;
public
  constructor Create(Msg, WParam, LParam: Cardinal);
  function getResult: Cardinal;
  procedure setResult(const AResult: Cardinal);
  ...
  property Result: Cardinal read getResult write setResult;
  property Msg: Cardinal read getMsg write setMsg;
  property WParam read getWParam write setWParam;
  property LParam read getLParam write setLParam;
end;

after that I will use it so:

    MessageEvent := QLCLMessageEvent_create(QEventUser, Msg, WParam, 
LParam);
    try
      QCoreApplication_postEvent(Widget, MessageEvent);
    finally
      QEvent_destroy(MessageEvent);
    end;

and I want to catch it in EventFilter of Widget.

I need this stuff in order to simulate windows PostMessage.

Best regards,
Paul Ishenin.



More information about the Qt mailing list