elizabeth.h1
9th February 2010, 10:55
Hello
I'am using Qt 4.5.2
I have specific situation in which I need first to create dialog with parent=0, and then reparent it before showing it.
The following doesn't work, i.e the dialog is never shown :
MyDialog* dlg=new MyDialog(0);
dlg->setParent(some_other_dlg_ptr);
dlg->show();
Is this supposed to work ? The documentation for QDialog says that it should work, unless I am missing something :
"Use the overload of the QWidget::setParent() function to change the ownership of a QDialog widget."
Thank you
I'am using Qt 4.5.2
I have specific situation in which I need first to create dialog with parent=0, and then reparent it before showing it.
The following doesn't work, i.e the dialog is never shown :
MyDialog* dlg=new MyDialog(0);
dlg->setParent(some_other_dlg_ptr);
dlg->show();
Is this supposed to work ? The documentation for QDialog says that it should work, unless I am missing something :
"Use the overload of the QWidget::setParent() function to change the ownership of a QDialog widget."
Thank you