How close and delete a modeless qt dialog

Viewed 15331

i have create a modeless qdialog inside a method of a class:

//Test.cpp

QDialogMaintenance *diag = new QDialogMaintenance(this);
diag->show();
diag->raise();
diag->activateWindow();

I can close the dialog only clicking on the "X" icon in the dialog frame. How can i delete the "diag" instance in the test.cpp?

1 Answers
Related