For now I can do:
void MainWindow::on_actionPATH_triggered() {
std::unique_ptr<QDialog> win(new QDialog());
win->exec();
}
Should I use async / run in separate threadto avoid blocking main window or is there way to subscribe to close even and delete / free object there?
You can use just
show()and use
From doc:
Qt::WA_DeleteOnClosewill delete your dialog, when user close it.You can also set parent to dialog:
In this case
winwill be delete with your mainWindow.Info about Qt parent child relationship
And you don't need here separate thread.