Sign in Join

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

Mailing lists / qt / 2007-06

Patch for GetContainterWidget

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

zeljko
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote
Commited, 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 ?

Reply by email

Felipe Monteiro de Carvalho
to zeljko
zeljko wrote
Anyone interested ?

Sure, but I think we will need to wait until Den comes back from his vacations.

Some other qt issues I noticed:

* Using the .so for linux that Den distributes gives me errors. I need to build it myself. This didn't happen on the past, so it would be nice to know what changed that Den's so don't work anymore.

* That workaround on the unicode string function isn't perfect. If we are running from the IDE, it will catch the exceptions, and this makes debugging a qt-lcl app that happens to fall into that function hard ...

Felipe Monteiro de Carvalho

Reply by email