title: how to disable parent window on open child in Qt?
body: <p>I want to forbid any action in the main window, including its closure. while open child</p>
  
  <p>I try:</p>
  
  
  
  <pre><code>// child window
  Settings::Settings(QWidget *parent) :
      QWidget(parent),
      ui(new Ui::Settings)
  {
      ui-&gt;setupUi(this);
      ((QWidget*)parent)-&gt;setEnabled(false); // or parent-&gt;setEnabled(false);
   ...
  </code></pre>
  
  <p>makes segmentation fault on <code>Settings-&gt;show();</code></p>
  
  <p>and I try send signal from Settings constructor/destructor
  to <code>MainClass</code> slot</p>
  
  
  
  <pre><code>void MainClass::Enable(bool enable)
  {
    qDebug() &lt;&lt; "detect signal enable"; // 
    this-&gt;setEnable(enable);
  }
  </code></pre>
  
  <p>but signal wasn't sent.</p>
  
  <p>ofcourse i connect <code>Settings</code> to <code>MainClass</code>)).
  signal emiting works in any other function of <code>Settings</code>.</p>