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:
Qt Code:
  1. void MainWindow::on_Open_clicked()
  2. {
  3. Dialog *dialog = new Dialog (this); // remember to set parent !
  4. dialog->setModal(true);
  5. connect(dialog, SIGNAL(validate(QString)), this, SLOT(validate(QString)));
  6. dialog->exec();
  7.  
  8. }
To copy to clipboard, switch view to plain text mode