Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2007-09

Request for QEvent subclass

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Павел Ишенин

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.

Den Jean
to Павел Ишенин
????? ?????? wrote
Hello, Items specific to the Qt widget set

http://doc.trolltech.com/4.3/qobject.html#setProperty could have been used too, but I will look into your stuff.

Show quoted text 43 lines
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. _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt
Paul Ishenin
to Den Jean

Den Jean ?????:

Show quoted text 8 lines
On Saturday 22 September 2007 19:30:40 ????? ?????? wrote: > Hello, Items specific to the Qt widget set http://doc.trolltech.com/4.3/qobject.html#setProperty could have been used too, but I will look into your stuff.

Ow, I forgot about that :) But imho special event is better solution.

I will check it with setProperty, but if you implement that stuff I will switch code to it.

Best regards,
Paul Ishenin.

Paul Ishenin
to Paul Ishenin

Paul Ishenin ?????:

Show quoted text 14 lines
Den Jean ?????: > On Saturday 22 September 2007 19:30:40 ????? ?????? wrote: >> Hello, Items specific to the Qt widget set > > http://doc.trolltech.com/4.3/qobject.html#setProperty > could have been used too, but I will look into your stuff. > > Ow, I forgot about that :) But imho special event is better solution. I will check it with setProperty, but if you implement that stuff I will switch code to it.

Ups, QEvent is not QObject descendant !

Best regards,
Paul Ishenin.