Quote Originally Posted by pkjag View Post
So i did this:
Qt Code:
  1. void MainWindow::newFile()
  2. {
  3.  
  4.  
  5. SkoolCalcWizard wizard;
  6. wizard.show();
  7.  
  8.  
  9. }
To copy to clipboard, switch view to plain text mode 
But then the program runs and does the same thing as above, it immediately exits once i click on the New action.
You create a local variable that goes out of scope once the function ends. While exec() is a blocking call that doesn't return until the dialog is closed, show() behaves differently -- it schedules an event to show the widget and returns immediately.