You create a new dialog in main window's constructor and never exec it, it is useless.
Remove it from the constructor and connect to instances created in on_Open_clicked() slot:
void MainWindow::on_Open_clicked()
{
Dialog *dialog = new Dialog (this); // remember to set parent !
dialog->setModal(true);
connect(dialog,
SIGNAL(validate
(QString)),
this,
SLOT(validate
(QString)));
dialog->exec();
}
void MainWindow::on_Open_clicked()
{
Dialog *dialog = new Dialog (this); // remember to set parent !
dialog->setModal(true);
connect(dialog, SIGNAL(validate(QString)), this, SLOT(validate(QString)));
dialog->exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks