but sir, is there a way to fix my error?
My professor wants me to do it that way

you say that my error is that I don't have a class dialog.
but don't I have one at secwindow.h line 23??
Added after 59 minutes:
I edited the void MainWindow::show();
void MainWindow::show()
{
connect(dialog, SIGNAL(accepted()), this, SLOT(show()));
connect(dialog, SIGNAL(rejected()), this, SLOT(show()));
dialog->show();
hide();
};
void MainWindow::show()
{
QDialog *dialog = new QDialog(this);
connect(dialog, SIGNAL(accepted()), this, SLOT(show()));
connect(dialog, SIGNAL(rejected()), this, SLOT(show()));
dialog->show();
hide();
};
To copy to clipboard, switch view to plain text mode
there's no error anymore but it just doesn't show my main window.
it says that:
QObject::connect: (sender name: 'MainWindow')
QObject::connect: (receiver name: 'MainWindow')
It just shows like a blank window first, then when I close that blank window...my main window will appear(in this part, the modal approach still works)
how can I fix this please?
Bookmarks