PDA

View Full Version : Close Button on Modal Widget?



vishal.chauhan
15th February 2008, 09:25
Hi All,

I have a widget which open on a dialog.
I have set the modality of that widget by using


this->setWindowModality (Qt::ApplicationModal);

This works fine in the sense that it open a modal widget but the problem is that it does not show the close button on the upper left corner.

So how should I make a modal widget with close button enabled.

Thanks.

jpn
15th February 2008, 21:37
QDialog::exec() might be a bit less error-prone way to handle modal dialogs...

vishal.chauhan
18th February 2008, 05:09
Thanks for Reply.
But Actually I am using QWidget not QDialog.

vishal.chauhan
18th February 2008, 10:28
Even If I use QDialog still I am not getting close button.
I am opening the dialog on a Widget.

jpn
18th February 2008, 10:38
Which version of Qt? Here's one relevant bug I could find but it was already fixed to Qt 4.1.3: http://trolltech.com/developer/task-tracker/index_html?method=entry&id=95836

vishal.chauhan
18th February 2008, 11:38
I am using Qt 4.2.2.
Do I need to set some flags.