auto delete EditWindow at its closing

This commit is contained in:
giomba 2019-08-07 16:02:26 +02:00
parent 7ffeed0495
commit 450b8d4f2d
1 changed files with 1 additions and 1 deletions

View File

@ -64,8 +64,8 @@ void MainWindow::on_tableSoci_clicked(const QModelIndex& index) {
int id = index.model()->data(index.siblingAtColumn(0)).toInt();
if (id != 0) { /* if click is not on other fields than id... */
EditWindow* w = new EditWindow(id, this);
w->setAttribute(Qt::WA_DeleteOnClose); /* delete window at the end */
w->show();
// TODO -- free() this window at the end... maybe you can use a self Signal/Slot?
}
}