I meet an problem in mac, after i run an model dialog, the application quit!, I note that i have set the parent of the dialog to NULL, maybe it's the reason that why the application quit, because if i set the parent to some widget, it won't. so i want to know the exact reason. and it work good on Window, althought the parent is NULL.

QFileDialog *pImportDlg = new QFileDialog;
QDesktopWidget* desktop = QApplication::desktop();
pImportDlg->move((desktop->width() - pImportDlg->width())/2, (desktop->height() - pImportDlg->height())/2);
pImportDlg->setFileMode(QFileDialog::ExistingFiles);

if (QDialog::Accepted == pImportDlg->exec())
{
// do something
}

Appreciate for any point!