title: How to terminate a qt programming if initialization failed?
body: <pre><code>MainWindows::MainWindow(QWidget *parent) :
                   QMainWindow(parent) , ui(new Ui::MainWindow) {
        ui-&gt;setupUi(this);
  
        some initialization code here
  }
  </code></pre>
  
  <p>I want to terminate the whole application if the initialization failed, how could I do this?</p>
  
  <p>Thanks.</p>