Sign in Join

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

Mailing lists / qt / 2008-02

QApplication::focusChanged

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Paul Ishenin

Hello, Items specific to the Qt widget set.

We have QApplication_focusChanged_Event, but we cannot attach it to the application object. Den, can you give a way to do that?

Best regards, Paul Ishenin.
Den Jean
to Paul Ishenin
am Paul Ishenin wrote
We have QApplication_focusChanged_Event, but we cannot attach it to the application object. Den, can you give a way to do that?

look in mainwindow.pas :

Hook:=QApplication_hook_create(Handle);
QApplication_focusChanged_Event(Method):=FocusChanged;
QApplication_hook_hook_focusChanged(Hook,Method);

you could delete the hook at program exit.
but then again every memory is released at program exit anyhow.

http://users.pandora.be/Jan.Van.hijfte/qtforfpc/demos-V1.62_Qt4.3.1.tar.gz

Paul Ishenin
to Den Jean
Den Jean wrote 12 lines
On Wednesday 27 February 2008 07:11:56 am Paul Ishenin wrote: > We have QApplication_focusChanged_Event, but we cannot attach it to the > application object. Den, can you give a way to do that? > look in mainwindow.pas : Hook:=QApplication_hook_create(Handle); QApplication_focusChanged_Event(Method):=FocusChanged; QApplication_hook_hook_focusChanged(Hook,Method);

why I have not seen that QApplication_hook_hook_focusChanged :)

you could delete the hook at program exit. but then again every memory is released at program exit anyhow.

Ok, I will delete it anyway in qt interface finalization code.

thanks.

Best regards,
Paul Ishenin.