From 450b8d4f2d19f10e43ec112763bd93036518a9da Mon Sep 17 00:00:00 2001 From: giomba Date: Wed, 7 Aug 2019 16:02:26 +0200 Subject: [PATCH] auto delete EditWindow at its closing --- argento/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/argento/MainWindow.cpp b/argento/MainWindow.cpp index fdc5ac8..d04d792 100644 --- a/argento/MainWindow.cpp +++ b/argento/MainWindow.cpp @@ -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? } }