auto delete EditWindow at its closing
This commit is contained in:
parent
7ffeed0495
commit
450b8d4f2d
|
@ -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?
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue