[Qt-interest] Modal QDialog inside QMdiArea

Malyushytsky, Alex alex at wai.com
Mon Feb 9 21:14:08 CET 2009


>From Qt documentation:
"A modal dialog is a dialog that blocks input to other visible windows in the same application."

>> Dialog should block window 2, but it doesn't block anything.

I believe your assumption is wrong, modal dialog is never expected to block only it first parent.

Also even though QDialog is a widget, it is more than a widget, and it is unusual to integrate it the way you are trying to do.
QDialog is not supposed to be used as an mdi sub-window.
In case of modal dialog, it also does not make any sence, because whole application gui supposed to be blocked once you call exec.

If it is not blocked, it probably means QMdiSubWindow or QMDiArea is changing its behaviour, removing modality.
I would still avoid using QDialog in such form, cause I am not sure what is happening to modal loop in this case.

Use QWidget instead of the QDialog.
If you need any blocking, do it yourself.

Best regards,
   Alex Malyushytsky



---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

"Please consider our environment before printing this email."




More information about the Qt-interest-old mailing list