Forum > QT

OnDeactivate + csNoFocus doesn't work in QT5 & QT6

(1/1)

El Salvador:
Hi all,

I'm working on https://github.com/Matek0611/PospoLite. I'im porting it to Linux and I noticed this behavior of qt5 & qt6.

I set the OnDeactivate event to close the form (at the end, replace the popupmenu with a radial menu) on focus change. If I set csNoFocus to the form, the event doesn't fire anymore. And it seems right to me as behavior. But how can I close the window? I would need an event analogous to OnDeactivate.

This behavior is not present in gtk2 and win32 widgets. And the event is fired, with or without csNoFocus (wtf!?).

I am attaching a simplified example.

Thank you!

zeljko:
Please open issue against Qt5 and Qt6 and attach that example there.

El Salvador:
Done. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40020

Thank you!

zeljko:
Thanks :)

Navigation

[0] Message Index

Go to full version