Recent

Author Topic: OnDeactivate + csNoFocus doesn't work in QT5 & QT6  (Read 844 times)

El Salvador

  • Full Member
  • ***
  • Posts: 134
OnDeactivate + csNoFocus doesn't work in QT5 & QT6
« on: November 26, 2022, 10:17:43 am »
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

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: OnDeactivate + csNoFocus doesn't work in QT5 & QT6
« Reply #1 on: November 26, 2022, 12:59:43 pm »
Please open issue against Qt5 and Qt6 and attach that example there.

El Salvador

  • Full Member
  • ***
  • Posts: 134

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: OnDeactivate + csNoFocus doesn't work in QT5 & QT6
« Reply #3 on: November 26, 2022, 05:05:59 pm »
Thanks :)

 

TinyPortal © 2005-2018