Felipe Monteiro de Carvalho wroteCommited, but I opted for a different organization of the code to fix
this. Please test.
it's ok, I've fixed another really BIG problem.
Case:
1.Assign OnCloseQuery() of some form (eg. modal).
put there something like
CanClose := MessageDlg('Close this form ??',mtConfirmation, [mbYes, mbNo],
0);
2.Put one button onto form and assign OnClick() event, inside event put Close;
3.Now start app and call this small example form.
a). When you click on Button, it will ask you about closing , and everything is fine.
b). When you click on X (close button on form title), form dissapears, and no matter what did you answer , form is dead.
Solution:
QWidget have closeEvent (which by default accepts QCloseEvent) protected function which cannot be overriden just like that via our bindings, but I've found a solution how to override this void, and now it works like a charm. Qt bindings need an small update for this to work.
Anyone interested ?