I don't get the connection between both dialogs... if you want to close the first after user pressed on a button: connect thi button with "close"-slot. When you want to open a second dialog - open it after exec() has returned.

Qt Code:
  1. Dialog dlg;
  2. dlg.exec();
  3. Dialog dlg2;
  4. dlg2.exec();
To copy to clipboard, switch view to plain text mode