[Qt] Qt widgetset MessageDlg

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Feb 15 07:12:43 CET 2007


On 2/15/07, Hess, Philip J <pjhess at purdue.edu> wrote:
> MessageDlg doesn't work right with the Qt widgetset. On both Windows and OS X it's just a tall box that extends below the task bar/dock. On OS X, the buttons aren't accessible.

That is correct, it´s like that on Linux too. I tryed some time ago to
implement it, but I got confused, so it´s better to ask on the main
mailling list where Vincent, Mattias, etc should know better then I
what needs to be done. Althougth I think I already asked without much
answer, so one will probably have to dig lcl code to find out how this
works.

> I noticed that Qt4.pas provides access to Qt's QMessageBox. Is there some way to use this in the Qt widgetset?

I don´t think so. AFAIK lcl message box uses a normal form with some buttons.

As far as I remember, the current dialog is huge because Autosizing
doesn´t work, and the dialog is based on autosizing stuff to set it´s
size and the positions of buttons. I don´t remember where autosizing
is implemented.

> I tried to figure out how the LCL MessageDlg works, but it looks like kind of a mess. We would need to set PromptDialogFunction to point to a function of type TPromptDialogFunction. In the LCL, this is set to ShowPromptDialog, but that's where it starts to lose me. Have you looked at this?

Yes, but that´s all on LCL, and not where we must implement, the
widgetset code. The key here is to create a trivial app that shows a
message box, set a breakpoint and go with F7/F8 inside LCL code
slowly. I think that on the end you will find some WinAPI functions
which are missing, or only partially implemented. Then implementing
those functions should fix message dlg.

-- 
Felipe Monteiro de Carvalho



More information about the Qt mailing list