L
L
Loligan2015-06-08 20:38:44
Qt
Loligan, 2015-06-08 20:38:44

How to destroy and clear everything after closing the window?

How to destroy all class objects and clear all rows and tables after closing (I use hide)? The fact is that if you return there again, then there will be information that was when the window was closed

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tugo, 2015-06-09
@tugo

Delete the window on close and re-create it when it needs to be shown.

E
EXL, 2015-06-09
@EXL

Create modal dialog on stack? Something like:

void MainWindow::showSettingsDialog()
{
    QDialog settingsDialog(this);
    int result = settingsDialog.exec();
    if (result == QDialog::Accepted) {
        // Some code here
    } else if (result == QDialog::Rejected) {
        // Some code here
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question