PDA

View Full Version : modal QWidget



lucasbemo
16th December 2010, 12:28
How do I create a modal QWidget, I'm just managing to create a modal QDialog, but not a modal QWidget.

Thanks in advance.

FelixB
16th December 2010, 12:49
QWidget::show()

lucasbemo
16th December 2010, 13:10
hum....
I tried this, but not work ! : /

hum....
I tried this, but not work, simply displays the window on the screen, but not modal : /

wysota
16th December 2010, 13:42
Derive your widget from QDialog instead of QWidget and call QDialog::setModal() or QDialog::exec(). By the way, a modal non-dialog window is some kind of misdesign.

lucasbemo
16th December 2010, 13:54
Well work, wysote thank you very much!